javascript - Informatiion inside a tag -
<td valign="top"> <script language="javascript">genuserfriendlycoursestatus('w')</script>request</td>
i want text "request". did following:
p = soup.findall("script") p.nextsibling
but gave me null
. tried soup.text
gave information inside script tag , did not give "request" @ all. please advise.
first of all, script tag single tag not list of tags dont use findall. following should -
import re p = soup.find('script', text=re.compile('genuserfriendlycoursestatus')) print p.next_sibling.text
Comments
Post a Comment