python - Using BeautifulSoup to find all elements starting with a given letter -
if want find <p> elementswith id=test beautifulsoup, use :
for item in soup.findall('p', {"id": "test"}):
how find every
element id starting specific letter - let's "t"?
i tried "t*" doesn't work.
try:
import re item in soup.findall('p', {"id": re.compile('^t')}):
Comments
Post a Comment