Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- from bs4 import *
- import urllib2
- import re
- if len(sys.argv) != 2:
- print "USAGE:"
- print "Python test.py Your_URL"
- else:
- url = sys.argv[1]
- html_page = urllib2.urlopen(url)
- soup = BeautifulSoup(html_page)
- for link in soup.findAll('a'):
- print link.get('href')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement