def _get_items(self, url): try: headers = {'User-Agent': client.agent()} r = client.request(url, headers=headers) posts = client.parseDOM(r, 'tbody')[0] posts = client.parseDOM(posts, 'tr') for post in posts: data = dom.parse_dom(post, 'a', req='href')[1] link = urlparse.urljoin(self.base_link, data.attrs['href']) name = data.content t = name.split(self.hdlr)[0] if not cleantitle.get(re.sub('(|)', '', t)) == cleantitle.get(self.title): continue try: y = re.findall('[\.|\(|\[|\s|\_|\-](S\d+E\d+|S\d+)[\.|\)|\]|\s|\_|\-]', name, re.I)[-1].upper() except BaseException: y = re.findall('[\.|\(|\[|\s\_|\-](\d{4})[\.|\)|\]|\s\_|\-]', name, re.I)[-1].upper() if not y == self.hdlr: continue try: size = re.findall('((?:\d+\,\d+\.\d+|\d+\.\d+|\d+\,\d+|\d+)\s*(?:GiB|MiB|GB|MB))', post)[0] div = 1 if size.endswith('GB') else 1024 size = float(re.sub('[^0-9|/.|/,]', '', size.replace(',', '.'))) / div size = '%.2f GB' % size except BaseException: size = '0' self.items.append((name, link, size)) return self.items except BaseException: return self.items
def __init__(self): self.priority = 1 self.language = ['en'] self.domains = ['limetorrents.info', 'torrentdownloads.me'] self.base_link = 'https://www.torrentdownloads.me' self.search = 'https://www.torrentdownloads.me/rss.xml?new=1&type=search&cid={0}&search={1}' self.headers = {'User-Agent': client.agent()}
def sources(self, url, hostDict, hostprDict): try: self._sources = [] if url is None: return self._sources data = urlparse.parse_qs(url) data = dict([(i, data[i][0]) if data[i] else (i, '') for i in data]) self.title = data['tvshowtitle'] if 'tvshowtitle' in data else data['title'] self.hdlr = 'S%02dE%02d' % (int(data['season']), int(data['episode'])) if 'tvshowtitle' in data else data['year'] query = '%s S%02dE%02d' % ( data['tvshowtitle'], int(data['season']), int(data['episode'])) if 'tvshowtitle' in data else '%s %s' % ( data['title'], data['year']) query = re.sub(r'(\\\|/| -|:|;|\*|\?|"|\'|<|>|\|)', ' ', query) if 'tvshowtitle' in data: url = self.search.format('8', urllib.quote(query)) else: url = self.search.format('4', urllib.quote(query)) self.hostDict = hostDict + hostprDict headers = {'User-Agent': client.agent()} _html = client.request(url, headers=headers) threads = [] for i in re.findall(r'<item>(.+?)</item>', _html, re.DOTALL): threads.append(workers.Thread(self._get_items, i)) [i.start() for i in threads] [i.join() for i in threads] return self._sources except Exception: failure = traceback.format_exc() log_utils.log('---Torrdown Testing - Exception: \n' + str(failure)) return self._sources
def __init__(self): self.priority = 1 self.language = ['en'] self.domains = ['limetorrents.info'] self.base_link = 'https://www.limetorrents.info' self.tvsearch = 'https://www.limetorrents.info/search/tv/{0}/' self.moviesearch = 'https://www.limetorrents.info/search/movies/{0}/' self.headers = {'User-Agent': client.agent()}
def __init__(self): self.priority = 1 self.language = ['en'] self.domains = ['glodls.to'] self.base_link = 'https://glodls.to/' self.tvsearch = 'search_results.php?search={0}&cat=41&incldead=0&inclexternal=0&lang=1&sort=seeders&order=desc' self.moviesearch = 'search_results.php?search={0}&cat=1&incldead=0&inclexternal=0&lang=1&sort=size&order=desc' self.min_seeders = int(control.setting('torrent.min.seeders')) self.headers = {'User-Agent': client.agent()}
def __init__(self): self.priority = 1 self.language = ['en'] # Old 1337x.se 1337x.eu 1337x.ws self.domains = ['1337x.to', '1337x.st', '1337x.is', 'the1337x.org'] self.base_link = 'https://1337x.to/' self.tvsearch = 'https://1337x.to/sort-category-search/%s/TV/seeders/desc/1/' self.moviesearch = 'https://1337x.to/sort-category-search/%s/Movies/seeders/desc/1/' self.min_seeders = int(control.setting('torrent.min.seeders')) self.headers = {'User-Agent': client.agent()}
def _get_items(self, url): items = [] try: headers = {'User-Agent': client.agent()} r = client.request(url, headers=headers) posts = client.parseDOM(r, 'tr', attrs={'class': 't-row'}) posts = [i for i in posts if not 'racker:' in i] for post in posts: data = client.parseDOM(post, 'a', ret='href') url = [i for i in data if 'magnet:' in i][0] seeders = re.findall( "<td class='ttable_col2' align='center'><font color='green'><b>(.+?)</b></font></td>", post)[0] if self.min_seeders > seeders: continue name = client.parseDOM(post, 'a', ret='title')[0] t = name.split(self.hdlr)[0] if not cleantitle.get(re.sub('(|)', '', t)) == cleantitle.get( self.title): continue try: y = re.findall( '[\.|\(|\[|\s|\_|\-](S\d+E\d+|S\d+)[\.|\)|\]|\s|\_|\-]', name, re.I)[-1].upper() except BaseException: y = re.findall( '[\.|\(|\[|\s\_|\-](\d{4})[\.|\)|\]|\s\_|\-]', name, re.I)[-1].upper() if not y == self.hdlr: continue try: size = re.findall( '((?:\d+\,\d+\.\d+|\d+\.\d+|\d+\,\d+|\d+)\s*(?:GiB|MiB|GB|MB))', post)[0] div = 1 if size.endswith('GB') else 1024 size = float( re.sub('[^0-9|/.|/,]', '', size.replace(',', '.'))) / div size = '%.2f GB' % size except BaseException: size = '0' items.append((name, url, size)) return items except BaseException: return items