Open ralphbean opened 11 years ago
There is something about the default httplib2 user-agent that causes some web servers to throw up.
Try this, for example::
>>> import httplib2 >>> h = httplib2.Http() >>> response, content = h.request( ... "http://ankursinha.in/blog/feed/") >>> response.status 406 >>> response, content = h.request( ... "http://ankursinha.in/blog/feed/", ... headers={'user-agent': 'trololololololol 9000'}) >>> response.status 200
Adding a custom user agent mitigated my issue with BadStatusLine errors. Thanks
There is something about the default httplib2 user-agent that causes some web servers to throw up.
Try this, for example::