Created
September 28, 2019 17:42
-
-
Save rafikahmed/56d18956a08b70c78cde0f88c9d707e9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
script =''' | |
headers ={ | |
['User-Agent'] = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", | |
['cookie'] = 'AKAM_CLIENTID=900310a15c7997a11d2fb87ba96b454b; gb_lang=en; gb_pipeline=GB; _ga=GA1.2.1217688139.1555317699; gb_countryCode=DZ; _fbp=fb.1.1555317699787.334894344; gb_currencyCode=USD; od=gzguxgyfmdgy1555317700622; gb_vid=8153f54a-97b5-a192-9676-c0fd4028b6ae; gb_guid=407704339; _gcl_au=1.1.124645050.1563146349; __atssc=google%3B1; __atuvc=8%7C30%2C12%7C31; aff_mss_info_bak={"bak":"bak"}; linkid=19147949; aff_mss_info={"lkid":"19147949"}; landingUrl=https://www.gearbest.com/flash-sale.html; _ngroup=[{"tid":3,"v":[{"n":"_nlnkid","v":"19147949"}],"lt":1569691945,"ct":1569691945}]; _gid=GA1.2.1136355824.1569691945; _dc_gtm_UA-48073707-1=1; ak_bmsc=D9330EDB75843DE802EF9D0F1461508B4F8C5EFE587D000032998F5D414ED406~plzK7NKpuYIFP7MISrzxYqivqeIm3UHRCKb5HR+sD9QjKiG5Z/HSktEavkyeZWM5lCTwj5ne9MGYvNQF/qbdiExmEH7oJUvGi0D4jyWCyMB0Vbk7L2ZtLEwslG+iee8S0Je25DwLH3Dd7Hb540YxndYG+ysIGnNd/qcYxIIfp2apgLoAhHcR/YK7ZtAE+g9QdQLp/0GKiiblHuUkNVVQb6ta+LA9z6YRx+C+TYZ9JxTzR2VeuzOI0cKAJU9mL0a/L2' | |
} | |
splash:set_custom_headers(headers) | |
splash.private_mode_enabled=false | |
splash.images_enabled=false | |
assert(splash:go(args.url)) | |
assert(splash:wait(0.5)) | |
return splash:html() | |
''' | |
resp=requests.post(url ='http://192.168.99.100:8050/run', json ={ | |
'lua_source':script, | |
'url':'https://www.gearbest.com/flash-sale.html' | |
}) | |
print(resp.content) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment