import requests
cookies = {
'tracking': 'CgAGP10XvNSUqQTlCXyjAg==',
'_ym_uid': '1561836758104163398',
'_ym_d': '1561836758',
'_ga': 'GA1.2.1279103674.1561836758',
'_fbp': 'fb.1.1561836758351.1073513853',
'popmechanic_sbjs_migrations': 'popmechanic_1418474375998%3D1%7C%7C%7C1471519752600%3D1%7C%7C%7C1471519752605%3D1',
}
headers = {
'Connection': 'keep-alive',
'Upgrade-Insecure-Requests': '1',
'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',
'Sec-Fetch-Mode': 'navigate',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3',
'Sec-Fetch-Site': 'same-origin',
'Referer': 'https://spb-wlc3.hse.ru/login.html',
'Accept-Encoding': 'gzip, deflate, br',
'Accept-Language': 'ru,en;q=0.9',
'x-compress': 'null',
}
params = (
('switch_url', 'https://spb-wlc3.hse.ru/login.html'),
('ap_mac', '00:a6:ca:47:fe:40'),
('wlan', 'HSE'),
('statusCode', '1'),
)
response = requests.get('https://spb-wlc3.hse.ru/fs/customwebauth/login.html', headers=headers, params=params, cookies=cookies)
#NB. Original query string below. It seems impossible to parse and
#reproduce query strings 100% accurately so the one below is given
#in case the reproduced version is not "correct".
# 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)
Comments