scrapy 刮Map坐标(Mapbox和leafletjs)

cygmwpex  于 2022-11-09  发布在  其他
关注(0)|答案(1)|浏览(129)

我需要从下一页的Map中提取纬度和经度的帮助(向下滚动查看Map)https://projects.worldbank.org/en/projects-operations/project-detail/P162594这是仅Maphttps://maps.worldbank.org/?pid=P162594&hideTaskbar=true的链接
我什么都试过了,都没有成功。很明显,他们用的是传单和Map盒。

iugsix8n

iugsix8n1#

您可以检查您的浏览器的网络分析,以获取相应的API请求,并查看是否可以在Python或R中复制它。

curl 'https://maps.worldbank.org/gspext-api/rest/postgres/visibleCountries/' -X POST -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:98.0) Gecko/20100101 Firefox/98.0' -H 'Accept: */*' -H 'Accept-Language: de,en-US;q=0.7,en;q=0.3' -H 'Accept-Encoding: gzip, deflate, br' -H 'Origin: https://maps.worldbank.org' -H 'DNT: 1' -H 'Connection: keep-alive' -H 'Sec-Fetch-Dest: empty' -H 'Sec-Fetch-Mode: no-cors' -H 'Sec-Fetch-Site: same-origin' -H 'Sec-GPC: 1' -H 'Pragma: no-cache' -H 'Cache-Control: no-cache' -H 'TE: trailers' --data-raw '{"level":0,"ccodes":"","polygon":null,"filters":{"proj_stat_name":["Active"]}}'

相关问题