Dolda2000 GitWeb
/
automanga.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Extracted the standard imgstream from mrnet and mangafox and put it in lib.
[automanga.git]
/
manga
/
htcache.py
diff --git
a/manga/htcache.py
b/manga/htcache.py
index
2f71f9a
..
4212db3
100644
(file)
--- a/
manga/htcache.py
+++ b/
manga/htcache.py
@@
-13,6
+13,9
@@
class cache(object):
def miss(self, url):
s = urllib.urlopen(url)
try:
+ if s.headers.get("content-encoding") == "gzip":
+ import gzip, StringIO
+ return gzip.GzipFile(fileobj=StringIO.StringIO(s.read()), mode="r").read()
return s.read()
finally:
s.close()