Jan-27-2019, 01:33 AM
So my guess was correct,if look at my example code do you not see your error?
Can not just past in HTML code,have to put it in triple quote.
Can not just past in HTML code,have to put it in triple quote.
from bs4 import BeautifulSoup xml = '''\ <lat> <latitude>1.123123</latitude> </lat>''' soup = BeautifulSoup(xml, 'html.parser') lat = soup.find('latitude') print((lat.text))
Output:1.123123