Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2019
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.84 KB | None | 0 0
  1. import requests
  2. s = requests.Session()
  3. url = 'https://1xstavka.ru/testcupon/getresults/'
  4. headers = {
  5.     'Accept': 'application/json, text/javascript, */*; q=0.01',
  6.     'Accept-Encoding': 'gzip, deflate, br',
  7.     'Accept-Language': 'ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7',
  8.     'Connection': 'keep-alive',
  9.     'Content-Length': '4',
  10.     'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
  11.     'Cookie': 'SESSION=3021a055790...', # куки передал целиком с браузера
  12.     'Host': '1xstavka.ru',
  13.     'Origin': 'https://1xstavka.ru',
  14.     'Referer': 'https://1xstavka.ru/testcupon/',
  15.     'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.108 Safari/537.36',
  16.     'X-Requested-With': 'XMLHttpRequest'
  17. }
  18. r = s.post(url, {'num': '123456789'}, headers=headers)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement