Last active
July 18, 2018 19:35
-
-
Save d-schmidt/fbe5818664353597dad57bffdbdae26e to your computer and use it in GitHub Desktop.
Simple HTML parsing with python requests and 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
import requests | |
import lxml.html | |
t = requests.get("https://www.hearthpwn.com/news/5425-final-witchwood-card-reveal-stream-live-updates").text | |
html = lxml.html.fromstring(t) | |
links = html.xpath("//span/span[@class='pretty-bg']/a") | |
for link in links: | |
print(link.get("href")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment