forked from GreyMatters-Tech/BYPASS-BOT
-
Notifications
You must be signed in to change notification settings - Fork 2
/
y.py
49 lines (36 loc) · 1.11 KB
/
y.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#@title **<---FINAL STEP**
import time
import requests
import cloudscraper
from bs4 import BeautifulSoup
from urllib.parse import urlparse
url = "https://gplinks.co/j0f4K"
# ==============================================
def gplinks_bypass(url):
scraper = cloudscraper.create_scraper(allow_brotli=False)
res = scraper.get(url)
h = { "referer": res.url }
res = scraper.get(url, headers=h)
bs4 = BeautifulSoup(res.content, 'lxml')
inputs = bs4.find_all('input')
data = { input.get('name'): input.get('value') for input in inputs }
h = {
'content-type': 'application/x-www-form-urlencoded',
'x-requested-with': 'XMLHttpRequest'
}
time.sleep(5) # !important
p = urlparse(url)
final_url = f'{p.scheme}://{p.netloc}/links/go'
res = scraper.post(final_url, data=data, headers=h).json()
return res
# ==============================================
print(gplinks_bypass(url))
# ==============================================
f'''
SAMPLE OUTPUT:
{
'Status': 'Bypassed',
'Info': 'XXXXXX',
'Bypassed URL': 'XXXX' (Bypassed URL)
}
'''