def __init__(self, expire=0, size=0): self.cache_catalog = Cache('rutracker_catalog.db') self.cache_profile = Cache('rutracker_profile.db', expire, size) self.http = RuTrackerHTTP() self.re = { 'is_int': re.compile(r'^([0-9]+)', re.U), 'is_float': re.compile(r'^([0-9]{1,10}\.[0-9]+)', re.U), 'hash': re.compile(r'<span id="tor-hash">([0-9A-F]{40})</span>', re.U) } self.html = Clear() self.status = { '%': 'check', 'D': 'repeat', '!': 'nodesc', '©': 'copyright', '∏': 'moder', 'x': 'close', '∑': 'absorb', '#': 'doubtful', '*': 'nocheck', '?': 'neededit', 'T': 'temp', '√': 'ok' }
def __init__(self): self.cache = Cache('kinopoisk.db') self.html = Clear() self.http = HTTP() self.headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; rv:10.0.2) Gecko/20100101 Firefox/10.0.2', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'Accept-Language': 'ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3', 'Cache-Control': 'no-cache', 'Referer': 'http://www.kinopoisk.ru/level/7/' }
def __init__(self): self.api_key = '1D62F2F90030C444' self.cache = Cache('tvdb.db') self.http = HTTP() self.headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; rv:10.0.2) Gecko/20100101 Firefox/10.0.2', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'Accept-Language': 'ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3', 'Cache-Control': 'no-cache', 'Referer': 'http://www.thetvdb.com/' }