Answer the question
In order to leave comments, you need to log in
Why does the regular expression with the tag not work?
I'm trying to rip out the text using reg. expression, under the tag that is inside a particular table:<nobr>
soup = BeautifulSoup(resArrow, 'lxml')
tbl = soup.find('tbl', id='maintbl')
for nobr in tbl.find_all('nobr', text=re.compile("MB")):
# ничего не находится
<nobr>
<nobr>1895.35 MB<br/><a href="down.php?id=555"><b>2,55 tlm</b></a></nobr>
print (nobr.getText())
issues1895.35 MB2.55 tlm
for nobr in tbl.find_all('nobr', text=re.compile(".*MB.*")):
for nobr in tbl.find_all('nobr', text="1895.35 MB2,55 tlm"):
for nobr in tbl.find_all('nobr', text="1895.35 MB"):
, but also found nothing. <nobr>
for nobr in tbl.find_all('nobr'):
if "MB" in nobr.getText(): # так работает
, but I really want to figure out what's wrong with the regular season.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question