Posted By

yanek1988 on 04/21/11


Tagged


Versions (?)

Crawler


 / Published in: Python
 

  1. import urllib2
  2.  
  3. req = urllib2.Request('http://www.interia.pl')
  4. req.add_header('Referer', 'http://www.onet.pl')
  5. req.add_header('User-agent', 'Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.98 Safari/534.13')
  6.  
  7. content = urllib2.urlopen(req).read()

Report this snippet  

You need to login to post a comment.