Created
March 30, 2016 15:00
-
-
Save ehmo/2790b1467ff4180a4b116f7846cd24a2 to your computer and use it in GitHub Desktop.
Regex in lxml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
script = webpage.xpath( | |
"//script[re:match(text(), 'params')]", | |
namespaces={ | |
"re": "http://exslt.org/regular-expressions" | |
} | |
)[0].text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment