ghickman/tvrenamr — Issue #11: Decompress gzip-encoded XML from TheTVDB API
Author: sampsyo
Created: 2011-11-17 00:52:02+00:00
State: open

It looks like thetvdb.com is sending gzip-compressed HTTP responses even though tvrenamr is not requesting it by sending the associated "Accept-Encoding" header. Just running:

>>> import urllib2
>>> urllib2.urlopen('http://www.thetvdb.com/api/C4C424B4E9137AFD/series/79488/default/5/22/en.xml').read()

gives a compressed response. This means that all requests to this backend result in an XML parse error.

Here's an example of using the built-in gzip module to decode this kind of thing: [this function](https://github.com/sampsyo/pyacoustid/blob/master/acoustid/__init__.py#L73) and [this check](https://github.com/sampsyo/pyacoustid/blob/master/acoustid/__init__.py#L116)

My apologies for such rapid-fire issue filing; I don't mean to be demanding about an open-source project. Feel free to just ignore me. :)