Код: Выделить всё
import json
import random
import requests
from bs4 import BeautifulSoup
from pprint import pprint
link = 'https://services3.arcgis.com/PwS5hVLYsEN2U36s/arcgis/rest/services/Development_Tracker/FeatureServer/0/query'
params = {
'f': 'json',
'objectIds': '5415',
'outFields': 'CONTACT_EMAIL,CREATED_DATE,FOLDER_NUMBER,FolderCategory,FolderStatus,FolderType,PURPOSE,SUBJECT,OBJECTID',
'outSR': '102100',
'returnGeometry': 'false',
'spatialRel': 'esriSpatialRelIntersects',
'where': "FolderStatus IN ('IN-PROGRESS','ACTIVE','NEW','ON HOLD','RECEIVED')"
}
headers = {
'accept': '*/*',
'referer': 'https://courtenay.maps.arcgis.com/apps/instant/interactivelegend/index.html?appid=54fb2a6c01174902976ffa788231411b&locale=en¢er=-124.9938;49.6905&level=13',
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36'
}
res = requests.get(link,params=params,headers=headers)
print(res.status_code)
pprint(res.json())
Подробнее здесь: https://stackoverflow.com/questions/793 ... -a-webpage