X-Git-Url: http://git.dolda2000.com/gitweb/?a=blobdiff_plain;f=manga%2Fmangafox.py;h=0ebca6002926f17bc9d6e48d00e1970e8a1071ea;hb=3bba3a7b136276653da1a0782168a6464309f539;hp=e06acfa2a2ee4b54055f2ed2bc430e58cb7f4805;hpb=f3ad0817587482b5a726db4c2f82072e191355e1;p=automanga.git diff --git a/manga/mangafox.py b/manga/mangafox.py index e06acfa..0ebca60 100644 --- a/manga/mangafox.py +++ b/manga/mangafox.py @@ -3,7 +3,7 @@ import BeautifulSoup import lib, htcache soup = BeautifulSoup.BeautifulSoup -class imgstream(object): +class imgstream(lib.imgstream): def __init__(self, url): self.bk = urllib.urlopen(url) self.ctype = self.bk.info()["Content-Type"] @@ -11,12 +11,6 @@ class imgstream(object): def close(self): self.bk.close() - def __enter__(self): - return self - - def __exit__(self, *exc_info): - self.close() - def read(self, sz = None): if sz is None: return self.bk.read() @@ -198,3 +192,6 @@ class library(lib.library): pno += 1 ls = self.alphapage(pno) i = 0 + + def __iter__(self): + raise NotImplementedError("mangafox iterator")