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

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -