Created
July 18, 2014 08:53
-
-
Save mperlet/5749f24004d186759e68 to your computer and use it in GitHub Desktop.
>python link_parser.py <url> <jquery_selector>
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
from pyquery import PyQuery as pq | |
import sys | |
doc = pq(url=sys.argv[1]) | |
links = doc(sys.argv[2]) | |
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
returns list of links