well it 'works' but blocked by cloudflare
This commit is contained in:
27
pyapi/demo.py
Normal file
27
pyapi/demo.py
Normal file
@@ -0,0 +1,27 @@
|
||||
import cloudscraper
|
||||
|
||||
|
||||
def main():
|
||||
scraper = cloudscraper.create_scraper()
|
||||
res = scraper.post(
|
||||
"https://gamebooking24.com/lottery-api/v1/user/dealer-list",
|
||||
headers={
|
||||
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:140.0) Gecko/20100101 Firefox/140.0",
|
||||
"Accept": "application/json, text/plain, */*",
|
||||
"Accept-Language": "en-US,en;q=0.5",
|
||||
"Content-Type": "application/json;charset=utf-8",
|
||||
"Authorization": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJ3ZWIiLCJpc3MiOiJsb3R0ZXJ5IiwiZXhwIjoxNzY2OTc5NDE5LCJpYXQiOjE3NjY4OTMwMTksImp0aSI6IjEzZGQ4MDVjYWYxOTRhNzZiMjljNzlhYmVjZjM1MDAxIiwidXNlcm5hbWUiOiIyOThIQU0ifQ.CllSMlgycFWaIvq43oh3c_f_t1z-YlQ0lmWGd1EaIYU",
|
||||
"Access-Control-Allow-Origin": "*",
|
||||
"Sec-GPC": "1",
|
||||
"Sec-Fetch-Dest": "empty",
|
||||
"Sec-Fetch-Mode": "cors",
|
||||
"Sec-Fetch-Site": "same-origin",
|
||||
},
|
||||
json={"page": 1, "pageSize": 999999, "parentDistributor": 179},
|
||||
)
|
||||
print(res.status_code)
|
||||
print(res.text)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user