My first time posting. I am using BeautifulSoup 4 and python 2.7 (pycharm). I have a webpage containing elements and I need to extract specific elements where the tags
I guess it works if you just omit the .parent in your code. At least this worked for my problem which is very similar to yours.
Here's my html, where order of the is not guaranteed:
- Time
- 10:05:02
- Temp
- 20.5°C
I'm accessing the values successfully with the following code:
time = at_tl.find("dt",text="Time").findNext("dd").string
temp = at_tl.find("dt",text="Temp").findNext("dd").string