def get_gallery(self, _id): match = re.match(r'(?:(?:.+izneo.com/)?readv2-)?(\d+-\d+)/?$', _id) if match is None: return None with self.browser: _id = match.group(1) return BaseGallery(_id, url=('http://www.izneo.com/readv2-%s' % _id))
def get_gallery(self, _id): match = re.match(r'^%s$' % self.URL_REGEXP, _id) if match: _id = match.group(1) else: match = re.match(r'^%s$' % self.ID_REGEXP, _id) if match: _id = match.group(0) else: return None gallery = BaseGallery(_id, url=(self.ID_TO_URL % _id)) with self.browser: return gallery
def get_gallery(self, _id): title, icon = self.browser.get_title_icon() if icon: icon = Thumbnail(icon) return BaseGallery(_id, title=title, url=self.url(), thumbnail=icon)
def __init__(self, *args, **kwargs): BaseGallery.__init__(self, *args, **kwargs)
def __init__(self, *args, **kwargs): BaseGallery.__init__(self, *args, **kwargs) self.nsfw = True
def search_galleries(self, pattern, sortby=CapGallery.SEARCH_RELEVANCE): for info in self.browser.search_categories(pattern): gall = BaseGallery(info['id']) gall.title = info['title'] yield gall
def get_gallery(self, _id): url = self.config['url'].get() return BaseGallery(_id, title=urlparse(url).netloc, url=url)