Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23131

Scrape lat and lon from mapbox

$
0
0

I would like to use Python to scrape the lat and lon of all the items on this mapbox map but I cannot seem to find the right query.

I have tried this but it doesnt seem to get me anywhere, any help would be appreciated:

import requestsimport bs4import jsonurl = 'https://www.bakerinstitute.org/sites/default/files/2023-04/China_Energy_Map_040323.html'headers = {'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36'}response = requests.get(url, headers=headers, verify=False)soup = bs4.BeautifulSoup(response.text, 'html.parser')

Viewing all articles
Browse latest Browse all 23131

Trending Articles