def __init__(self, proto = 'http', **kw): self.Proto = proto log(10, "Creating %r", self) self.URL = '%s://api.4chan.org/boards.json' % self.Proto Fetch4chan.__init__(self, **kw)
def __init__(self, boardID, pageID, proto = 'http', **kw): self.Proto = proto self.Board = boardID self.Page = int(pageID) log(10, "Creating %r - board:%r page:%r", self, boardID, pageID) self.URL = '%s://api.4chan.org/%s/%d.json' % (self.Proto, self.Board, self.Page) Fetch4chan.__init__(self, **kw)
def __init__(self, boardID, threadID, proto = 'http', **kw): self.Proto = proto self.Board = boardID self.Thread = threadID log(10, "Creating %r - board:%r thread:%r", self, boardID, threadID) self.URL = '%s://api.4chan.org/%s/res/%d.json' % (self.Proto, self.Board, self.Thread) Fetch4chan.__init__(self, **kw)