Код: Выделить всё
import requests
from pprint import pprint
link = 'https://arcweb.hcad.org/server/rest/services/public/public_query/MapServer/0/query'
params = {
'f': 'json',
'distance': 2,
'outFields': '*',
'outSR': '102100',
'spatialRel': 'esriSpatialRelIntersects',
'units': 'esriSRUnit_StatuteMile',
'where': "HCAD_NUM = '0523620090003'",
}
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36',
'Accept': '*/*',
'Accept-Encoding': 'gzip, deflate, br',
'Accept-Language': 'en-US,en;q=0.9',
}
with requests.Session() as s:
s.headers.update(headers)
res = s.get(link,params=params)
pprint(res.json()['features'][0]['attributes'])
Подробнее здесь: https://stackoverflow.com/questions/786 ... ating-a-se