Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python3
- import re
- import urllib.request
- from sys import argv
- script, url,filename = argv
- with urllib.requests.urlopen(url) as resp:
- page = resp.read()
- with open(filename, "w") as f:
- f.write('\n'.join( re.findall("(?:(?:https?|ftp):\/\/)?[\w/\-?=%.]+\.[\w/\-?=%.]+", page) ))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement