elkclone

urldatagrab.py

Feb 18th, 2014
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.57 KB | None | 0 0
  1. #!/usr/bin/python
  2. """ Your mission should you choose to accept it:... use urllib() module to
  3. grab instances of a user specified charactar string from read() url target.
  4. write() those characters or files to a local summary data file. Storing the
  5. Extracted data for later use and processing. ;-) DataMining """
  6.  
  7. import sys
  8. import os
  9. import re
  10. import urllib
  11. def urldog():
  12.     uf = urllib.urlopen('http://google.com')
  13.     print uf.read()
  14.     uf.close()
  15. # set up main
  16. def main():
  17.     urldog()
  18.    
  19. #call main
  20. if __name__ == '__main__':
  21.     main()
Advertisement
Add Comment
Please, Sign In to add comment