mardi 28 septembre 2021

How to extract latitude and longitude in a web

I have extract some infos in https://www.peakbagger.com/list.aspx?lid=5651 under the first column https://www.peakbagger.com/peak.aspx?pid=10882


from urllib.request import urlopen
from bs4 import BeautifulSoup
import pandas as pd

url = 'https://www.peakbagger.com/peak.aspx?pid=10882'
html = urlopen(url)
soup = BeautifulSoup(html, 'html.parser')

a= soup.select("td")
a

would want to only retrieve the latitude and longitude which is 35.360638, 138.727347 from the output I get.

It is in

E<br/>35.360638, 138.727347 

And also, is there a better way to retrieve all the latitude and longitude from the links of /https://ift.tt/3lZxTko other than doing one by one?

Thanks




Aucun commentaire:

Enregistrer un commentaire