Guest User

Untitled

a guest
Feb 2nd, 2021
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.32 KB | None | 0 0
  1. import requests
  2. import base64
  3.  
  4. cookies = {
  5.     'rsess_id': 'pqklv72pdbduc2u7okus1atcun287ka8',
  6.     'token_stat': '5d1ba089594-09d',
  7.     'e5982dc': '0cfe0ef3a357503c4a4538414b870ca1',
  8.     'top100_id': 't1.4511585.1888377750.1612261193532',
  9.     'last_visit': '1612250600080::1612261400080',
  10. }
  11.  
  12. headers = {
  13.     'Connection': 'keep-alive',
  14.     'Pragma': 'no-cache',
  15.     'Cache-Control': 'no-cache',
  16.     'Accept': 'application/json, text/javascript, */*; q=0.01',
  17.     'DNT': '1',
  18.     'X-Requested-With': 'XMLHttpRequest',
  19.     'X-REESTR-TOKEN': 'r158251afeg',
  20.     'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36 OPR/73.0.3856.344',
  21.     'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
  22.     'Origin': 'https://rosreester.net',
  23.     'Sec-Fetch-Site': 'same-origin',
  24.     'Sec-Fetch-Mode': 'cors',
  25.     'Sec-Fetch-Dest': 'empty',
  26.     'Referer': 'https://rosreester.net/',
  27.     'Accept-Language': 'ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7',
  28. }
  29. address = 'Москва Славянская 4с1'
  30. encoded = base64.b64encode(str.encode(address))
  31. data = {
  32.   'b': encoded,
  33.   'p': '1'
  34. }
  35.  
  36. response = requests.post('https://rosreester.net/ajax/get_egrn_by_b.json', headers=headers, cookies=cookies, data=data)
  37. final_result = response.json()
Add Comment
Please, Sign In to add comment