Created
April 7, 2015 22:08
-
-
Save peterix/ea0a3fee9ba839a6c533 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/python2 | |
from lxml import html | |
import requests | |
from operator import methodcaller | |
page = requests.get('https://www.patreon.com/user?u=130816&ty=p') | |
tree = html.fromstring(page.text) | |
patrons = tree.xpath("//div[contains(concat(' ', normalize-space(@class), ' '), ' shareWindow ')]/h1/a/text()") | |
print "\n".join(filter(None, map(methodcaller("strip"), patrons))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment