Advertisement
Guest User

Untitled

a guest
Jul 20th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. #!/usr/bin/python3
  2. import re
  3. import urllib.request
  4. from sys import argv
  5. script, url,filename = argv
  6.  
  7. with urllib.requests.urlopen(url) as resp:
  8.   page = resp.read()
  9. with open(filename, "w") as f:
  10.   f.write('\n'.join( re.findall("(?:(?:https?|ftp):\/\/)?[\w/\-?=%.]+\.[\w/\-?=%.]+", page) ))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement