-1

I'm trying to download pages from the site http://statsheet.com/

like this

url = 'http://statsheet.com'
urllib2.urlopen(url)

I have tried with the Python modules urllib, urllib2 and "reqests", but I only get error messages like "got a bad status line", "BadStatusLine" or similar

Is there any way to get around this?

Eric C.
  • 1
  • 1

1 Answers1

0

You need to specify a common browser user agent e.g.

wget -U "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.34 Safari/537.36" http://statsheet.com

Related question/answer:

Changing user agent on urllib2.urlopen

Community
  • 1
  • 1