If I want to find all <p> elementswith id=test with BeautifulSoup, I use :
for item in soup.findAll('p', {"id": "test"}):
How do I find every
element with an ID starting with a specific letter - let's say "t"?
I tried "t*" but it doesn't work.
try:
import re
for item in soup.findAll('p', {"id": re.compile('^t')}):
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With