gt22

Untitled

Oct 16th, 2019
342
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. import requests
  2.  
  3. cookies = {
  4. 'tracking': 'CgAGP10XvNSUqQTlCXyjAg==',
  5. '_ym_uid': '1561836758104163398',
  6. '_ym_d': '1561836758',
  7. '_ga': 'GA1.2.1279103674.1561836758',
  8. '_fbp': 'fb.1.1561836758351.1073513853',
  9. 'popmechanic_sbjs_migrations': 'popmechanic_1418474375998%3D1%7C%7C%7C1471519752600%3D1%7C%7C%7C1471519752605%3D1',
  10. }
  11.  
  12. headers = {
  13. 'Connection': 'keep-alive',
  14. 'Upgrade-Insecure-Requests': '1',
  15. 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36',
  16. 'Sec-Fetch-Mode': 'navigate',
  17. 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3',
  18. 'Sec-Fetch-Site': 'same-origin',
  19. 'Referer': 'https://spb-wlc3.hse.ru/login.html',
  20. 'Accept-Encoding': 'gzip, deflate, br',
  21. 'Accept-Language': 'ru,en;q=0.9',
  22. 'x-compress': 'null',
  23. }
  24.  
  25. params = (
  26. ('switch_url', 'https://spb-wlc3.hse.ru/login.html'),
  27. ('ap_mac', '00:a6:ca:47:fe:40'),
  28. ('wlan', 'HSE'),
  29. ('statusCode', '1'),
  30. )
  31.  
  32. response = requests.get('https://spb-wlc3.hse.ru/fs/customwebauth/login.html', headers=headers, params=params, cookies=cookies)
  33.  
  34. #NB. Original query string below. It seems impossible to parse and
  35. #reproduce query strings 100% accurately so the one below is given
  36. #in case the reproduced version is not "correct".
  37. # response = requests.get('https://spb-wlc3.hse.ru/fs/customwebauth/login.html?switch_url=https://spb-wlc3.hse.ru/login.html&ap_mac=00:a6:ca:47:fe:40&wlan=HSE&statusCode=1', headers=headers, cookies=cookies)
Advertisement
Add Comment
Please, Sign In to add comment