diff --git a/SearcherABC.py b/SearcherABC.py index 037c84e..417b7be 100644 --- a/SearcherABC.py +++ b/SearcherABC.py @@ -29,7 +29,6 @@ import os from StringIO import StringIO import gzip import socket -import xml.etree.ElementTree as ET import sys import xbmcgui @@ -180,25 +179,6 @@ class SearcherABC: os.mkdir(dirname) return dirname - def getByLabel(self, label): - clean_label = self.clean(label) - url = 'http://ruhunt.org/feed?q=%s' % urllib.quote_plus(clean_label) - - response = self.makeRequest(url) - if None != response and 0 < len(response): - #print response - try: - dat = ET.fromstring(response) - url = dat.findall('channel')[0].findall('item')[0].find('link').text - #print str(url) - response = self.makeRequest(url) - if None != response and 0 < len(response): - #print response - magnet = re.compile('', re.DOTALL | re.MULTILINE).findall(response)[0] - return magnet - except: - return - def timeout(self, add_seconds=0): seconds=10+(10*int(self.timeout_multi))+int(add_seconds) socket.setdefaulttimeout(int(seconds)) @@ -224,4 +204,7 @@ class SearcherABC: localFile.write(content) localFile.close() - return localFileName \ No newline at end of file + return localFileName + + def logout(self): + pass \ No newline at end of file diff --git a/functions.py b/functions.py index 2f938df..06f1da3 100644 --- a/functions.py +++ b/functions.py @@ -1774,11 +1774,19 @@ def first_run_230(delete_russian): Localization.localize('Would you like to install %s from "MyShows.me Kodi Repo" in Programs section?') % 'RuTrackerOrg', Localization.localize('Open installation window?')) if yes: + xbmc.executebuiltin('Dialog.Close(all,true)') xbmc.executebuiltin('XBMC.ActivateWindow(Addonbrowser,addons://search/%s)' % ('Torrenter Searcher')) def first_run_231(): if not __settings__.getSetting('first_run_231')=='True': __settings__.setSetting('first_run_231','True') ok = xbmcgui.Dialog().ok('< %s >' % Localization.localize('Torrenter Update 2.3.1'), - Localization.localize('I added custom searchers to Torrenter v2!'), - Localization.localize('Now you can use your login on trackers or write and install your own searcher!')) + Localization.localize('We added Android ARM full support to Torrenter v2!'), + Localization.localize('With external searcher support I deleted pre-installed ones!')) + + yes=xbmcgui.Dialog().yesno('< %s >' % Localization.localize('Torrenter Update 2.3.1'), + Localization.localize('You have no installed searchers!'), + Localization.localize('Would you like to install searcher from "MyShows.me Kodi Repo" in Programs section?'),) + if yes: + xbmc.executebuiltin('Dialog.Close(all,true)') + xbmc.executebuiltin('XBMC.ActivateWindow(Addonbrowser,addons://search/%s)' % ('Torrenter Searcher')) diff --git a/icons/clear.png b/icons/clear.png index 2e8d171..d4d3b12 100644 Binary files a/icons/clear.png and b/icons/clear.png differ diff --git a/icons/deluge.png b/icons/deluge.png index cb6d64c..f95fb65 100644 Binary files a/icons/deluge.png and b/icons/deluge.png differ diff --git a/icons/download-icon.png b/icons/download-icon.png index 8c24ce9..89a9121 100644 Binary files a/icons/download-icon.png and b/icons/download-icon.png differ diff --git a/icons/download.png b/icons/download.png index bb32d5b..bb8c0da 100644 Binary files a/icons/download.png and b/icons/download.png differ diff --git a/icons/fav.png b/icons/fav.png index 099bb4e..e867711 100644 Binary files a/icons/fav.png and b/icons/fav.png differ diff --git a/icons/history2.png b/icons/history2.png index 6a1ddc2..a26cefb 100644 Binary files a/icons/history2.png and b/icons/history2.png differ diff --git a/icons/list.png b/icons/list.png index 3922c87..c246e58 100644 Binary files a/icons/list.png and b/icons/list.png differ diff --git a/icons/magnet.png b/icons/magnet.png index b63cb91..a071d6b 100644 Binary files a/icons/magnet.png and b/icons/magnet.png differ diff --git a/icons/media.png b/icons/media.png index e5021d5..336c7d3 100644 Binary files a/icons/media.png and b/icons/media.png differ diff --git a/icons/pause-icon.png b/icons/pause-icon.png index d3294bb..a0eef3c 100644 Binary files a/icons/pause-icon.png and b/icons/pause-icon.png differ diff --git a/icons/search.png b/icons/search.png index 2c24a23..d403947 100644 Binary files a/icons/search.png and b/icons/search.png differ diff --git a/icons/settings.png b/icons/settings.png index b0a3b86..26edb9d 100644 Binary files a/icons/settings.png and b/icons/settings.png differ diff --git a/icons/stop-icon.png b/icons/stop-icon.png index 4290c76..388c0b3 100644 Binary files a/icons/stop-icon.png and b/icons/stop-icon.png differ diff --git a/icons/torrent-client.png b/icons/torrent-client.png index d3e11de..eb625dd 100644 Binary files a/icons/torrent-client.png and b/icons/torrent-client.png differ diff --git a/icons/torrentPlayer.png b/icons/torrentPlayer.png index cb012e3..2c87d82 100644 Binary files a/icons/torrentPlayer.png and b/icons/torrentPlayer.png differ diff --git a/icons/transmission.png b/icons/transmission.png index 0c952d8..f1c45e6 100644 Binary files a/icons/transmission.png and b/icons/transmission.png differ diff --git a/icons/unfav.png b/icons/unfav.png index 41a5b7a..1982740 100644 Binary files a/icons/unfav.png and b/icons/unfav.png differ diff --git a/icons/upload-icon.png b/icons/upload-icon.png index f22b63e..874b28c 100644 Binary files a/icons/upload-icon.png and b/icons/upload-icon.png differ diff --git a/icons/video.png b/icons/video.png index 4a533de..b509ff4 100644 Binary files a/icons/video.png and b/icons/video.png differ diff --git a/icons/vuze.png b/icons/vuze.png index 9c9b72e..cebf706 100644 Binary files a/icons/vuze.png and b/icons/vuze.png differ diff --git a/resources/searchers/BTDigg.py b/resources/searchers/BTDigg.py deleted file mode 100644 index 0cc78b4..0000000 --- a/resources/searchers/BTDigg.py +++ /dev/null @@ -1,69 +0,0 @@ -# -*- coding: utf-8 -*- - -import urllib -import json -import sys - -import SearcherABC - - -class BTDigg(SearcherABC.SearcherABC): - ''' - Weight of source with this searcher provided. - Will be multiplied on default weight. - Default weight is seeds number - ''' - sourceWeight = 1 - - ''' - Relative (from root directory of plugin) path to image - will shown as source image at result listing - ''' - searchIcon = '/resources/searchers/icons/BTDigg.png' - - ''' - Flag indicates is this source - magnet links source or not. - Used for filtration of sources in case of old library (setting selected). - Old libraries won't to convert magnet as torrent file to the storage - ''' - - @property - def isMagnetLinkSource(self): - return True - - ''' - Main method should be implemented for search process. - Receives keyword and have to return dictionary of proper tuples: - filesList.append(( - int(weight),# Calculated global weight of sources - int(seeds),# Seeds count - str(title),# Title will be shown - str(link),# Link to the torrent/magnet - str(image),# Path/URL to image shown at the list - )) - ''' - - def search(self, keyword): - filesList = [] - url="http://api.btdigg.org/api/private-c47ba652ee73735a/s02?q=%s" % (urllib.quote_plus(keyword)) - headers = [('User-Agent', - 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 YaBrowser/14.10.2062.12061 Safari/537.36'), - ('Referer', 'https://eztv.it/'), ('Accept-encoding', 'gzip'), ] - response = self.makeRequest(url, headers=headers) - - if None != response and 0 < len(response): - #print response - dat = json.loads(response) - #print str(dat) - for item in dat: - size = self.sizeConvert(item['size']) - seeds,leechers=0,0 - image = sys.modules["__main__"].__root__ + self.searchIcon - filesList.append(( - int(int(self.sourceWeight) * int(seeds)), - int(seeds), int(leechers), size, - self.unescape(self.stripHtml(item['name'])), - self.__class__.__name__ + '::' + item['magnet'], - image, - )) - return filesList \ No newline at end of file diff --git a/resources/searchers/EZTV.py b/resources/searchers/EZTV.py deleted file mode 100644 index 2ad7794..0000000 --- a/resources/searchers/EZTV.py +++ /dev/null @@ -1,91 +0,0 @@ -# -*- coding: utf-8 -*- -''' - Torrenter plugin for XBMC - Copyright (C) 2012 Vadim Skorba - vadim.skorba@gmail.com - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -''' - -import urllib -import re -import sys - -import SearcherABC - - -class EZTV(SearcherABC.SearcherABC): - ''' - Weight of source with this searcher provided. - Will be multiplied on default weight. - Default weight is seeds number - ''' - sourceWeight = 1 - - ''' - Relative (from root directory of plugin) path to image - will shown as source image at result listing - ''' - searchIcon = '/resources/searchers/icons/EZTV.png' - - ''' - Flag indicates is this source - magnet links source or not. - Used for filtration of sources in case of old library (setting selected). - Old libraries won't to convert magnet as torrent file to the storage - ''' - - @property - def isMagnetLinkSource(self): - return True - - ''' - Main method should be implemented for search process. - Receives keyword and have to return dictionary of proper tuples: - filesList.append(( - int(weight),# Calculated global weight of sources - int(seeds),# Seeds count - str(title),# Title will be shown - str(link),# Link to the torrent/magnet - str(image),# Path/URL to image shown at the list - )) - ''' - - def search(self, keyword): - filesList = [] - url="https://eztv.ch/search/" - data = {'SearchString1':urllib.quote_plus(keyword), - 'SearchString':'', - 'search':'Search'} - headers = [('User-Agent', - 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 YaBrowser/14.10.2062.12061 Safari/537.36'), - ('Referer', 'https://eztv.ch/'), ('Accept-encoding', 'gzip'), ] - response = self.makeRequest(url, data=data, headers=headers) - - if None != response and 0 < len(response): - #print response - dat = re.compile( - r'''class="epinfo">(.+?).+?. -''' - -import urllib -import re -import sys -#import HTMLParser - -import SearcherABC - - -class ExtraTorrent(SearcherABC.SearcherABC): - ''' - Weight of source with this searcher provided. - Will be multiplied on default weight. - Default weight is seeds number - ''' - sourceWeight = 1 - - ''' - Relative (from root directory of plugin) path to image - will shown as source image at result listing - ''' - searchIcon = '/resources/searchers/icons/ExtraTorrent.png' - - ''' - Flag indicates is this source - magnet links source or not. - Used for filtration of sources in case of old library (setting selected). - Old libraries won't to convert magnet as torrent file to the storage - ''' - - @property - def isMagnetLinkSource(self): - return True - - ''' - Main method should be implemented for search process. - Receives keyword and have to return dictionary of proper tuples: - filesList.append(( - int(weight),# Calculated global weight of sources - int(seeds),# Seeds count - str(title),# Title will be shown - str(link),# Link to the torrent/magnet - str(image),# Path/URL to image shown at the list - )) - ''' - - def getTorrentFile(self, url): - url=url.replace('download', 'torrent') - headers = [('User-Agent', - 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 YaBrowser/14.10.2062.12061 Safari/537.36'), - ('Referer', 'http://extratorrent.cc/'), ('Accept-encoding', 'gzip'), ] - content = self.makeRequest(url, headers=headers) - ok=re.compile('(magnet:.+?)"').findall(content) - if len(ok)>0: - return ok[0] - - def search(self, keyword): - filesList = [] - #pars = HTMLParser.HTMLParser() - url = "http://extratorrent.cc/search/?search=%s&new=1&x=0&y=0" % (urllib.quote_plus(keyword)) - headers = [('User-Agent', - 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 YaBrowser/14.10.2062.12061 Safari/537.36'), - ('Referer', 'http://extratorrent.cc/'), ('Accept-encoding', 'gzip'), ] - response = self.makeRequest(url, headers=headers) - self.cookieJar.save(ignore_discard=True) - - if None != response and 0 < len(response): - #print response - dat = re.compile( - r'''.+?(.+?).+?(.+?).+?(.+?)''', - re.DOTALL).findall(response) - for (link, title, size, seeds, leechers) in dat: - size = size.replace(' ', ' ') - seeds=seeds.replace('---', '0') - leechers=leechers.replace('---', '0') - image = sys.modules["__main__"].__root__ + self.searchIcon - link = 'http://extratorrent.cc/'+link - filesList.append(( - int(int(self.sourceWeight) * int(seeds)), - int(seeds), int(leechers), size, - self.unescape(self.stripHtml(title)), - self.__class__.__name__ + '::' + link, - image, - )) - return filesList \ No newline at end of file diff --git a/resources/searchers/KickAssSo.py b/resources/searchers/KickAssSo.py deleted file mode 100644 index 361c8a6..0000000 --- a/resources/searchers/KickAssSo.py +++ /dev/null @@ -1,95 +0,0 @@ -# -*- coding: utf-8 -*- -''' - Torrenter plugin for XBMC - Copyright (C) 2012 Vadim Skorba - vadim.skorba@gmail.com - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -''' - -import urllib -import re -import sys - -import SearcherABC - - -class KickAssSo(SearcherABC.SearcherABC): - ''' - Weight of source with this searcher provided. - Will be multiplied on default weight. - Default weight is seeds number - ''' - sourceWeight = 1 - - ''' - Relative (from root directory of plugin) path to image - will shown as source image at result listing - ''' - searchIcon = '/resources/searchers/icons/KickAssSo.png' - - ''' - Flag indicates is this source - magnet links source or not. - Used for filtration of sources in case of old library (setting selected). - Old libraries won't to convert magnet as torrent file to the storage - ''' - - @property - def isMagnetLinkSource(self): - return False - - ''' - Main method should be implemented for search process. - Receives keyword and have to return dictionary of proper tuples: - filesList.append(( - int(weight),# Calculated global weight of sources - int(seeds),# Seeds count - str(title),# Title will be shown - str(link),# Link to the torrent/magnet - str(image),# Path/URL to image shown at the list - )) - ''' - - def search(self, keyword): - filesList = [] - baseurl="http://kat.cr" - url = baseurl+"/usearch/%s/?field=seeders&sorder=desc" % urllib.quote_plus(keyword) - headers = [('User-Agent', - 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 YaBrowser/14.10.2062.12061 Safari/537.36'), - ('Referer', 'http://kickass.so/'), ('Accept-encoding', 'gzip'), ] - response = self.makeRequest(url, headers=headers) - - if None != response and 0 < len(response): - #print response - good_forums=['TV','Anime','Movies'] - result = re.compile( - r'''title="Download torrent file" href="(.+?\.torrent).+?" class=".+?">(.+?).+? in .+?">(.+?).+?(.+?).+?(\d+?).+?(\d+?)''', - re.DOTALL).findall(response) - for link,title,forum,size,seeds,leechers in result: - if forum in good_forums: - torrentTitle = self.unescape(self.stripHtml(title)) - size = self.unescape(self.stripHtml(size)) - image = sys.modules["__main__"].__root__ + self.searchIcon - #print link - filesList.append(( - int(int(self.sourceWeight) * int(seeds)), - int(seeds), int(leechers), size, - torrentTitle, - self.__class__.__name__ + '::' + link, - image, - )) - #print str(filesList) - return filesList - - diff --git a/resources/searchers/NNMClubRu.py b/resources/searchers/NNMClubRu.py deleted file mode 100644 index 059c557..0000000 --- a/resources/searchers/NNMClubRu.py +++ /dev/null @@ -1,152 +0,0 @@ -# -*- coding: utf-8 -*- -''' - Torrenter plugin for XBMC - Copyright (C) 2012 Vadim Skorba - vadim.skorba@gmail.com - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -''' - -import re -import sys - -import SearcherABC - - -class NNMClubRu(SearcherABC.SearcherABC): - ''' - Weight of source with this searcher provided. - Will be multiplied on default weight. - Default weight is seeds number - ''' - sourceWeight = 2 - - ''' - Relative (from root directory of plugin) path to image - will shown as source image at result listing - ''' - searchIcon = '/resources/searchers/icons/nnm-club.ru.png' - - ''' - Flag indicates is this source - magnet links source or not. - Used for filtration of sources in case of old library (setting selected). - Old libraries won't to convert magnet as torrent file to the storage - ''' - - @property - def isMagnetLinkSource(self): - return False - - ''' - Main method should be implemented for search process. - Receives keyword and have to return dictionary of proper tuples: - filesList.append(( - int(weight),# Calculated global weight of sources - int(seeds),# Seeds count - str(title),# Title will be shown - str(link),# Link to the torrent/magnet - str(image),# Path/URL to image shown at the list - ))''' - - def search(self, keyword): - filesList = [] - url = "http://nnm-club.me/forum/tracker.php" - - data = { - 'prev_sd': '0', - 'prev_a': '0', - 'prev_my': '0', - 'prev_n': '0', - 'prev_shc': '0', - 'prev_shf': '1', - 'prev_sha': '1', - 'prev_shs': '0', - 'prev_shr': '0', - 'prev_sht': '0', - 'o': '10', - 's': '2', - 'tm': '-1', - 'sd': '1', - 'shc': '1', - 'shs': '1', - 'ta': '-1', - 'sns': '-1', - 'sds': '-1', - 'nm': keyword.decode('utf-8').encode('cp1251'), - 'submit': '%CF%EE%E8%F1%EA'} - - headers = {('Origin', 'http://nnm-club.me'), - ('User-Agent', - 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 YaBrowser/14.10.2062.12061 Safari/537.36'), - ('Referer', 'http://nnm-club.me/forum/tracker.php?def=1')} - - response = self.makeRequest(url, data=data, headers=headers) - if None != response and 0 < len(response): - response = response.decode('cp1251').encode('utf-8') - #self.check_login(response) - #print response - forums = [24, 27, 23, 14, 26, 15] - regex = '(.+?).+?(?=#|).+?\d+? (.+?).+?(\d+).+?(\d+).+?' - for (forum, topic, title, link, size, seeds, leechers) in re.compile(regex, re.DOTALL).findall(response): - if int(forum) in forums and link not in ['', None]: - image = sys.modules["__main__"].__root__ + self.searchIcon - link = 'http://nnm-club.me/forum/download.php?id=' + link + '&' + topic - filesList.append(( - int(int(self.sourceWeight) * int(seeds)), - int(seeds), int(leechers), size, - self.unescape(self.stripHtml(title)), - self.__class__.__name__ + '::' + link, - image, - )) - return filesList - - def check_login(self, response=None): - if None != response and 0 < len(response): - if re.compile('').search(response): - print 'NNM-Club Not logged!' - self.login() - return False - return True - - def getTorrentFile(self, url): - self.timeout(5) - - referer = 'http://nnm-club.me/forum/viewtopic.php?t=' + re.search('(\d+)$', url).group(1) - #print url - - headers=[('Referer', referer)] - content = self.makeRequest(url,headers=headers) - - if not self.check_login(content): - content = self.makeRequest(url,headers=headers) - - return self.saveTorrentFile(url, content) - - def login(self): - data = { - 'password': 'torrenter', - 'username': 'torrenter-plugin', - 'login': '%C2%F5%EE%E4', - 'redirect': 'index.php', - 'autologin': 'on' - } - self.makeRequest( - 'http://nnm-club.me/forum/login.php', - data - ) - self.cookieJar.save(ignore_discard=True) - for cookie in self.cookieJar: - if cookie.name == 'phpbb2mysql_4_sid' and cookie.domain=='.nnm-club.me': - return 'phpbb2mysql_4_sid=' + cookie.value - return False \ No newline at end of file diff --git a/resources/searchers/Nyaa.py b/resources/searchers/Nyaa.py deleted file mode 100644 index b1f22ca..0000000 --- a/resources/searchers/Nyaa.py +++ /dev/null @@ -1,89 +0,0 @@ -# -*- coding: utf-8 -*- -''' - Torrenter plugin for XBMC - Copyright (C) 2012 Vadim Skorba - vadim.skorba@gmail.com - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -''' - -import urllib -import re -import sys -import HTMLParser - -import SearcherABC - - -class Nyaa(SearcherABC.SearcherABC): - ''' - Weight of source with this searcher provided. - Will be multiplied on default weight. - Default weight is seeds number - ''' - sourceWeight = 1 - - ''' - Relative (from root directory of plugin) path to image - will shown as source image at result listing - ''' - searchIcon = '/resources/searchers/icons/Nyaa.png' - - ''' - Flag indicates is this source - magnet links source or not. - Used for filtration of sources in case of old library (setting selected). - Old libraries won't to convert magnet as torrent file to the storage - ''' - - @property - def isMagnetLinkSource(self): - return False - - ''' - Main method should be implemented for search process. - Receives keyword and have to return dictionary of proper tuples: - filesList.append(( - int(weight),# Calculated global weight of sources - int(seeds),# Seeds count - str(title),# Title will be shown - str(link),# Link to the torrent/magnet - str(image),# Path/URL to image shown at the list - )) - ''' - - def search(self, keyword): - filesList = [] - pars = HTMLParser.HTMLParser() - url = "http://www.nyaa.se/?page=search&cats=1_0&term=%s&sort=2" % (urllib.quote_plus(keyword)) - headers = [('User-Agent', - 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 YaBrowser/14.10.2062.12061 Safari/537.36'), - ('Referer', 'http://www.nyaa.se/'), ('Accept-encoding', 'gzip'), ] - response = self.makeRequest(url, headers=headers) - - if None != response and 0 < len(response): - #print response - dat = re.compile( - r'''.+?>(.+?).+?(.+?)(\d+)(\d+)''', - re.DOTALL).findall(response) - for (title,link, size, seeds, leechers) in dat: - image = sys.modules["__main__"].__root__ + self.searchIcon - link = self.unescape(link) - filesList.append(( - int(int(self.sourceWeight) * int(seeds)), - int(seeds), int(leechers), size, - pars.unescape(self.stripHtml(title)), - self.__class__.__name__ + '::' + link, - image, - )) - return filesList \ No newline at end of file diff --git a/resources/searchers/README.txt b/resources/searchers/README.txt new file mode 100644 index 0000000..29bc387 --- /dev/null +++ b/resources/searchers/README.txt @@ -0,0 +1,3 @@ +Moved to MyShows.me Kodi Repo, please install from it. + +https://bitbucket.org/DiMartino/myshows.me-kodi-repo/downloads/repository.myshows.me.zip \ No newline at end of file diff --git a/resources/searchers/RiperAM.py b/resources/searchers/RiperAM.py deleted file mode 100644 index 18e0e97..0000000 --- a/resources/searchers/RiperAM.py +++ /dev/null @@ -1,145 +0,0 @@ -# -*- coding: utf-8 -*- -''' - Torrenter plugin for XBMC - Copyright (C) 2012 Vadim Skorba - vadim.skorba@gmail.com - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -''' - -import urllib -import re -import sys - -import SearcherABC - - -class RiperAM(SearcherABC.SearcherABC): - ''' - Weight of source with this searcher provided. - Will be multiplied on default weight. - Default weight is seeds number - ''' - sourceWeight = 1 - - ''' - Relative (from root directory of plugin) path to image - will shown as source image at result listing - ''' - searchIcon = '/resources/searchers/icons/RiperAM.png' - - ''' - Flag indicates is this source - magnet links source or not. - Used for filtration of sources in case of old library (setting selected). - Old libraries won't to convert magnet as torrent file to the storage - ''' - - @property - def isMagnetLinkSource(self): - return True - - ''' - Main method should be implemented for search process. - Receives keyword and have to return dictionary of proper tuples: - filesList.append(( - int(weight),# Calculated global weight of sources - int(seeds),# Seeds count - str(title),# Title will be shown - str(link),# Link to the torrent/magnet - str(image),# Path/URL to image shown at the list - )) - ''' - - def search(self, keyword): - filesList = [] - - url = "http://www.riper.am/search.php?sr=topics&sf=titleonly&fp=1&tracker_search=torrent&keywords=" + urllib.quote_plus(keyword) - #keyword) + "&terms=all&fp=1&author=&fid%5B%5D=238&fid%5B%5D=368&fid%5B%5D=425&fid%5B%5D=50&fid%5B%5D=52&fid%5B%5D=424&fid%5B%5D=51&fid%5B%5D=371&fid%5B%5D=251&fid%5B%5D=349&fid%5B%5D=350&fid%5B%5D=351&fid%5B%5D=352&fid%5B%5D=239&fid%5B%5D=420&fid%5B%5D=12&fid%5B%5D=13&fid%5B%5D=423&fid%5B%5D=16&fid%5B%5D=17&fid%5B%5D=18&fid%5B%5D=46&fid%5B%5D=15&fid%5B%5D=14&fid%5B%5D=240&fid%5B%5D=19&fid%5B%5D=216&fid%5B%5D=363&fid%5B%5D=118&fid%5B%5D=153&fid%5B%5D=632&fid%5B%5D=319&fid%5B%5D=183&fid%5B%5D=178&fid%5B%5D=364&fid%5B%5D=267&fid%5B%5D=365&fid%5B%5D=353&fid%5B%5D=710&fid%5B%5D=266&fid%5B%5D=268&fid%5B%5D=160&fid%5B%5D=20&fid%5B%5D=210&fid%5B%5D=969&fid%5B%5D=707&fid%5B%5D=685&fid%5B%5D=1004&fid%5B%5D=1028&fid%5B%5D=711&fid%5B%5D=736&fid%5B%5D=550&fid%5B%5D=601&fid%5B%5D=979&fid%5B%5D=692&fid%5B%5D=1038&fid%5B%5D=48&fid%5B%5D=555&fid%5B%5D=781&fid%5B%5D=790&fid%5B%5D=791&fid%5B%5D=509&fid%5B%5D=803&fid%5B%5D=994&fid%5B%5D=735&fid%5B%5D=992&fid%5B%5D=748&fid%5B%5D=771&fid%5B%5D=656&fid%5B%5D=501&fid%5B%5D=980&fid%5B%5D=1002&fid%5B%5D=964&fid%5B%5D=746&fid%5B%5D=976&fid%5B%5D=958&fid%5B%5D=719&fid%5B%5D=1006&fid%5B%5D=798&fid%5B%5D=768&fid%5B%5D=984&fid%5B%5D=732&fid%5B%5D=376&fid%5B%5D=152&fid%5B%5D=628&fid%5B%5D=563&fid%5B%5D=565&fid%5B%5D=562&fid%5B%5D=797&fid%5B%5D=983&fid%5B%5D=774&fid%5B%5D=989&fid%5B%5D=354&fid%5B%5D=640&fid%5B%5D=684&fid%5B%5D=1024&fid%5B%5D=961&fid%5B%5D=639&fid%5B%5D=703&fid%5B%5D=1013&fid%5B%5D=1040&fid%5B%5D=131&fid%5B%5D=727&fid%5B%5D=1015&fid%5B%5D=641&fid%5B%5D=686&fid%5B%5D=644&fid%5B%5D=760&fid%5B%5D=373&fid%5B%5D=654&fid%5B%5D=779&fid%5B%5D=372&fid%5B%5D=957&fid%5B%5D=1016&fid%5B%5D=766&fid%5B%5D=687&fid%5B%5D=991&fid%5B%5D=272&fid%5B%5D=761&fid%5B%5D=653&fid%5B%5D=551&fid%5B%5D=645&fid%5B%5D=986&fid%5B%5D=795&fid%5B%5D=750&fid%5B%5D=635&fid%5B%5D=962&fid%5B%5D=683&fid%5B%5D=708&fid%5B%5D=978&fid%5B%5D=997&fid%5B%5D=1026&fid%5B%5D=787&fid%5B%5D=773&fid%5B%5D=671&fid%5B%5D=1019&fid%5B%5D=1023&fid%5B%5D=225&fid%5B%5D=799&fid%5B%5D=788&fid%5B%5D=680&fid%5B%5D=794&fid%5B%5D=972&fid%5B%5D=359&fid%5B%5D=756&fid%5B%5D=1000&fid%5B%5D=552&fid%5B%5D=706&fid%5B%5D=1003&fid%5B%5D=630&fid%5B%5D=966&fid%5B%5D=226&fid%5B%5D=960&fid%5B%5D=995&fid%5B%5D=699&fid%5B%5D=714&fid%5B%5D=755&fid%5B%5D=358&fid%5B%5D=642&fid%5B%5D=1039&fid%5B%5D=360&fid%5B%5D=981&fid%5B%5D=977&fid%5B%5D=681&fid%5B%5D=675&fid%5B%5D=988&fid%5B%5D=355&fid%5B%5D=1025&fid%5B%5D=973&fid%5B%5D=445&fid%5B%5D=678&fid%5B%5D=970&fid%5B%5D=733&fid%5B%5D=505&fid%5B%5D=646&fid%5B%5D=1031&fid%5B%5D=990&fid%5B%5D=691&fid%5B%5D=1033&fid%5B%5D=690&fid%5B%5D=1030&fid%5B%5D=804&fid%5B%5D=780&fid%5B%5D=778&fid%5B%5D=805&fid%5B%5D=500&fid%5B%5D=743&fid%5B%5D=21&fid%5B%5D=185&fid%5B%5D=463&fid%5B%5D=633&fid%5B%5D=772&fid%5B%5D=606&fid%5B%5D=789&fid%5B%5D=162&fid%5B%5D=151&fid%5B%5D=22&fid%5B%5D=198&fid%5B%5D=232&fid%5B%5D=245&fid%5B%5D=246&fid%5B%5D=592&fid%5B%5D=594&fid%5B%5D=591&fid%5B%5D=595&fid%5B%5D=596&fid%5B%5D=597&fid%5B%5D=242&fid%5B%5D=164&fid%5B%5D=167&fid%5B%5D=165&fid%5B%5D=166&fid%5B%5D=241&fid%5B%5D=23&fid%5B%5D=446&fid%5B%5D=366&fid%5B%5D=553&fid%5B%5D=693&fid%5B%5D=229&fid%5B%5D=967&fid%5B%5D=975&fid%5B%5D=491&fid%5B%5D=516&fid%5B%5D=1032&fid%5B%5D=528&fid%5B%5D=577&fid%5B%5D=770&fid%5B%5D=478&fid%5B%5D=534&fid%5B%5D=540&fid%5B%5D=674&fid%5B%5D=1010&fid%5B%5D=471&fid%5B%5D=593&fid%5B%5D=538&fid%5B%5D=744&fid%5B%5D=561&fid%5B%5D=526&fid%5B%5D=605&fid%5B%5D=713&fid%5B%5D=344&fid%5B%5D=459&fid%5B%5D=959&fid%5B%5D=191&fid%5B%5D=519&fid%5B%5D=527&fid%5B%5D=460&fid%5B%5D=190&fid%5B%5D=659&fid%5B%5D=477&fid%5B%5D=255&fid%5B%5D=256&fid%5B%5D=634&fid%5B%5D=574&fid%5B%5D=764&fid%5B%5D=637&fid%5B%5D=33&fid%5B%5D=270&fid%5B%5D=450&fid%5B%5D=514&fid%5B%5D=658&fid%5B%5D=209&fid%5B%5D=530&fid%5B%5D=800&fid%5B%5D=475&fid%5B%5D=517&fid%5B%5D=548&fid%5B%5D=740&fid%5B%5D=741&fid%5B%5D=737&fid%5B%5D=587&fid%5B%5D=718&fid%5B%5D=1011&fid%5B%5D=456&fid%5B%5D=682&fid%5B%5D=469&fid%5B%5D=479&fid%5B%5D=480&fid%5B%5D=696&fid%5B%5D=996&fid%5B%5D=189&fid%5B%5D=1027&fid%5B%5D=541&fid%5B%5D=785&fid%5B%5D=668&fid%5B%5D=560&fid%5B%5D=752&fid%5B%5D=533&fid%5B%5D=447&fid%5B%5D=775&fid%5B%5D=993&fid%5B%5D=529&fid%5B%5D=793&fid%5B%5D=586&fid%5B%5D=525&fid%5B%5D=522&fid%5B%5D=1018&fid%5B%5D=1020&fid%5B%5D=472&fid%5B%5D=769&fid%5B%5D=484&fid%5B%5D=1009&fid%5B%5D=971&fid%5B%5D=511&fid%5B%5D=531&fid%5B%5D=638&fid%5B%5D=269&fid%5B%5D=1017&fid%5B%5D=782&fid%5B%5D=754&fid%5B%5D=524&fid%5B%5D=228&fid%5B%5D=715&fid%5B%5D=559&fid%5B%5D=765&fid%5B%5D=636&fid%5B%5D=730&fid%5B%5D=679&fid%5B%5D=493&fid%5B%5D=545&fid%5B%5D=537&fid%5B%5D=792&fid%5B%5D=547&fid%5B%5D=731&fid%5B%5D=468&fid%5B%5D=588&fid%5B%5D=348&fid%5B%5D=539&fid%5B%5D=982&fid%5B%5D=747&fid%5B%5D=490&fid%5B%5D=536&fid%5B%5D=742&fid%5B%5D=544&fid%5B%5D=963&fid%5B%5D=457&fid%5B%5D=786&fid%5B%5D=520&fid%5B%5D=518&fid%5B%5D=575&fid%5B%5D=489&fid%5B%5D=495&fid%5B%5D=271&fid%5B%5D=496&fid%5B%5D=689&fid%5B%5D=515&fid%5B%5D=449&fid%5B%5D=492&fid%5B%5D=535&fid%5B%5D=1021&fid%5B%5D=1005&fid%5B%5D=1012&fid%5B%5D=783&fid%5B%5D=521&fid%5B%5D=470&fid%5B%5D=698&fid%5B%5D=451&fid%5B%5D=694&fid%5B%5D=697&fid%5B%5D=762&fid%5B%5D=677&fid%5B%5D=1008&fid%5B%5D=753&fid%5B%5D=497&fid%5B%5D=188&fid%5B%5D=494&fid%5B%5D=738&fid%5B%5D=767&fid%5B%5D=1034&fid%5B%5D=543&fid%5B%5D=448&fid%5B%5D=59&fid%5B%5D=279&fid%5B%5D=281&fid%5B%5D=1035&fid%5B%5D=280&fid%5B%5D=542&fid%5B%5D=676&fid%5B%5D=763&fid%5B%5D=576&fid%5B%5D=578&fid%5B%5D=579&fid%5B%5D=589&fid%5B%5D=580&fid%5B%5D=581&fid%5B%5D=582&fid%5B%5D=583&fid%5B%5D=584&fid%5B%5D=585&fid%5B%5D=24&fid%5B%5D=194&fid%5B%5D=69&fid%5B%5D=669&fid%5B%5D=704&fid%5B%5D=88&fid%5B%5D=379&fid%5B%5D=68&fid%5B%5D=65&fid%5B%5D=784&fid%5B%5D=729&fid%5B%5D=89&fid%5B%5D=701&fid%5B%5D=643&fid%5B%5D=532&fid%5B%5D=63&fid%5B%5D=590&fid%5B%5D=796&fid%5B%5D=652&fid%5B%5D=498&fid%5B%5D=614&fid%5B%5D=739&fid%5B%5D=801&fid%5B%5D=965&fid%5B%5D=974&fid%5B%5D=670&fid%5B%5D=650&fid%5B%5D=252&fid%5B%5D=649&fid%5B%5D=802&fid%5B%5D=647&fid%5B%5D=728&fid%5B%5D=452&fid%5B%5D=323&fid%5B%5D=998&fid%5B%5D=599&fid%5B%5D=333&fid%5B%5D=672&fid%5B%5D=655&fid%5B%5D=1014&fid%5B%5D=1007&fid%5B%5D=712&fid%5B%5D=673&fid%5B%5D=759&fid%5B%5D=758&fid%5B%5D=334&fid%5B%5D=999&fid%5B%5D=332&fid%5B%5D=660&fid%5B%5D=648&fid%5B%5D=331&fid%5B%5D=335&fid%5B%5D=327&fid%5B%5D=324&fid%5B%5D=705&fid%5B%5D=1029&fid%5B%5D=329&fid%5B%5D=336&fid%5B%5D=702&fid%5B%5D=328&fid%5B%5D=1022&fid%5B%5D=325&fid%5B%5D=337&fid%5B%5D=330&fid%5B%5D=326&fid%5B%5D=25&fid%5B%5D=127&fid%5B%5D=616&fid%5B%5D=201&fid%5B%5D=146&fid%5B%5D=145&fid%5B%5D=985&fid%5B%5D=661&fid%5B%5D=211&fid%5B%5D=192&fid%5B%5D=622&fid%5B%5D=346&fid%5B%5D=199&sc=1&sf=firstpost&sr=topics&sk=ts&sd=d&st=0&ch=300&t=0&submit=%D0%9F%D0%BE%D0%B8%D1%81%D0%BA" - headers = [('User-Agent', - 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 YaBrowser/14.10.2062.12061 Safari/537.36'), - ('Referer', 'http://www.riper.am/'), ] - #('Cookie',str(sys.modules[ "__main__" ].__settings__.getSetting("rutor-auth")))] - response = self.makeRequest(url, headers=headers) - - if None != response and 0 < len(response): - self.cookieJar.save(ignore_discard=True) - self.check_login(response) - #print response - dat = re.compile( - r'(.+?).+?Размер: (.+?).+?" title="Сидеров">(\d+?).+?title="Личеров">(\d+?)', - re.DOTALL | re.I).findall(response) - if dat: - for (link, title, size, seeds, leechers) in dat: - torrentTitle = title - size = self.stripHtml(size) - link = 'http://www.riper.am' + link - image = sys.modules["__main__"].__root__ + self.searchIcon - filesList.append(( - int(int(self.sourceWeight) * int(seeds)), - int(seeds), int(leechers), size, - self.unescape(self.stripHtml(torrentTitle)), - self.__class__.__name__ + '::' + link, - image, - )) - return filesList - - def getTorrentFile(self, label): - if re.search('/download/', label): - return label - elif label.startswith('http'): - return self.getByLink(label) - else: - return self.getByLabel(label) - - - def getByLink(self, label): - response = self.makeRequest(label) - if None != response and 0 < len(response): - link = re.compile('(/download/file\.php\?id=\d+)', - re.DOTALL | re.MULTILINE).findall(response)[0] - return 'http://www.riper.am' + link - - def login(self): - data = { - 'password': 'torrenter', - 'username': 'torrenter-plugin', - 'remember':'1', - 'autologin':'on', - #'redirect':'./ucp.php?mode=login', - 'sid':'593f325609a91bf52ed8c424cd0ef270', - 'redirect':'index.php', - 'login':urllib.quote_plus('Вход') - } - headers = [('User-Agent', - 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 YaBrowser/14.10.2062.12061 Safari/537.36'), - ('Referer', 'http://www.riper.am/'), ] - x=self.makeRequest( - 'http://www.riper.am/ucp.php?mode=login',data=data, headers=headers) - if re.search('{"status":"OK"',x): - print 'LOGGED RiperAM' - self.cookieJar.save(ignore_discard=True) - for cookie in self.cookieJar: - if cookie.name == 'phpbb_63646738_sid' and cookie.domain=='.riper.am': - return 'phpbb_63646738_sid=' + cookie.value - return False - - def check_login(self, response=None): - if None != response and 0 < len(response): - #print response - if re.compile('ucp.php\?mode=login" title="Вход"').search(response): - print 'RiperAM Not logged!' - self.login() - return False - print 'RiperAM logged!' - return True \ No newline at end of file diff --git a/resources/searchers/RuTorOrg.py b/resources/searchers/RuTorOrg.py deleted file mode 100644 index a80765d..0000000 --- a/resources/searchers/RuTorOrg.py +++ /dev/null @@ -1,110 +0,0 @@ -# -*- coding: utf-8 -*- -''' - Torrenter plugin for XBMC - Copyright (C) 2012 Vadim Skorba - vadim.skorba@gmail.com - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -''' - -import urllib -import re -import sys - -import SearcherABC - - -class RuTorOrg(SearcherABC.SearcherABC): - ''' - Weight of source with this searcher provided. - Will be multiplied on default weight. - Default weight is seeds number - ''' - sourceWeight = 1 - - ''' - Relative (from root directory of plugin) path to image - will shown as source image at result listing - ''' - searchIcon = '/resources/searchers/icons/rutor.org.png' - - ''' - Flag indicates is this source - magnet links source or not. - Used for filtration of sources in case of old library (setting selected). - Old libraries won't to convert magnet as torrent file to the storage - ''' - - @property - def isMagnetLinkSource(self): - return False - - ''' - Main method should be implemented for search process. - Receives keyword and have to return dictionary of proper tuples: - filesList.append(( - int(weight),# Calculated global weight of sources - int(seeds),# Seeds count - str(title),# Title will be shown - str(link),# Link to the torrent/magnet - str(image),# Path/URL to image shown at the list - )) - ''' - - def search(self, keyword): - filesList = [] - self.timeout(5) - #print 'strating Rutor' - url = "http://anti-tor.org/search/0/0/100/2/%s" % urllib.quote_plus(keyword) - headers = [('User-Agent', - 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 YaBrowser/14.10.2062.12061 Safari/537.36'), - ('Referer', 'http://anti-tor.org'), ('Accept-encoding', 'gzip'), - ('Cookie', str(sys.modules["__main__"].__settings__.getSetting("rutor-auth")))] - response = self.makeRequest(url, headers=headers) - - #print response - - if None != response and 0 < len(response): - cookie = re.compile("document.cookie='(.+?)';").findall(response) - if cookie: - #print 'ok found cookie' - cookie = cookie[0] - #print str(cookie) - sys.modules["__main__"].__settings__.setSetting("rutor-auth", cookie) - headers = [('User-Agent', - 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 YaBrowser/14.10.2062.12061 Safari/537.36'), - ('Referer', 'http://anti-tor.org'), ('Accept-encoding', 'gzip'), - ('Cookie', str(sys.modules["__main__"].__settings__.getSetting("rutor-auth")))] - response = self.makeRequest(url, headers=headers) - - #print response - - if None != response and 0 < len(response): - dat = re.compile( - '.+?.+?(.+?).+?(\d*?\..+? .+?).+? (\d+).+?alt="L".+?> (\d+)', - re.DOTALL).findall(response) - if dat and len(dat) > 0: - for (link, title, size, seeds, leechers) in dat: - torrentTitle = title.strip() #"%s [S\L: %s\%s]" % (title, seeds, leechers) - size = size.replace(' ', ' ') - if link[0]=='/': link='http://anti-tor.org'+link - image = sys.modules["__main__"].__root__ + self.searchIcon - filesList.append(( - int(int(self.sourceWeight) * int(seeds)), - int(seeds), int(leechers), size, - self.unescape(self.stripHtml(torrentTitle)), - self.__class__.__name__ + '::' + link, - image, - )) - return filesList - diff --git a/resources/searchers/T411FR.py b/resources/searchers/T411FR.py deleted file mode 100644 index 53764a6..0000000 --- a/resources/searchers/T411FR.py +++ /dev/null @@ -1,128 +0,0 @@ -# -*- coding: utf-8 -*- -''' - Torrenter plugin for XBMC - Copyright (C) 2012 Vadim Skorba - vadim.skorba@gmail.com - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -''' - -import re -import urllib -import sys - -import SearcherABC - - -class T411FR(SearcherABC.SearcherABC): - ''' - Weight of source with this searcher provided. - Will be multiplied on default weight. - Default weight is seeds number - ''' - sourceWeight = 1 - - ''' - Relative (from root directory of plugin) path to image - will shown as source image at result listing - ''' - searchIcon = '/resources/searchers/icons/T411FR.png' - - ''' - Flag indicates is this source - magnet links source or not. - Used for filtration of sources in case of old library (setting selected). - Old libraries won't to convert magnet as torrent file to the storage - ''' - - @property - def isMagnetLinkSource(self): - return False - - ''' - Main method should be implemented for search process. - Receives keyword and have to return dictionary of proper tuples: - filesList.append(( - int(weight),# Calculated global weight of sources - int(seeds),# Seeds count - str(title),# Title will be shown - str(link),# Link to the torrent/magnet - str(image),# Path/URL to image shown at the list - ))''' - - headers = {('Origin', 'http://t411.io'), - ('User-Agent', - 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 YaBrowser/14.10.2062.12061 Safari/537.36'), - ('Referer', 'http://t411.io/'), ('X-NewRelic-ID', 'x='), - ('X-Requested-With', 'XMLHttpRequest'), } - - def search(self, keyword): - filesList = [] - url = 'http://www.t411.io/torrents/search/?search=%s' % urllib.quote_plus( - keyword.decode('utf-8').encode('cp1251')) - url += '&order=seeders&type=desc' - response = self.makeRequest(url, headers=self.headers) - if None != response and 0 < len(response): - # self.cookieJar.save(ignore_discard=True) - # self.check_login(response) - # print response - regex = '''.+?.+?.+?.+?.+?.+?.+?.+?(.+?).+?(\d+).+?(\d+)''' - for (title, link, size, seeds, leechers) in re.compile(regex, re.DOTALL).findall(response): - title = self.clear_title(title) - image = sys.modules["__main__"].__root__ + self.searchIcon - link = 'http://www.t411.io/torrents/download/?id=' + link - filesList.append(( - int(int(self.sourceWeight) * int(seeds)), - int(seeds), int(leechers), size, - title, - self.__class__.__name__ + '::' + link, - image, - )) - return filesList - - def clear_title(self, s): - return self.stripHtml(self.unescape(s)).replace(' ', ' ').replace(' ', ' ').strip() - - def check_login(self, response=None): - if None != response and 0 < len(response): - # print response - if re.compile('. -''' - -import re -import urllib -import sys - -import SearcherABC - - -class KinoZalTV(SearcherABC.SearcherABC): - ''' - Weight of source with this searcher provided. - Will be multiplied on default weight. - Default weight is seeds number - ''' - sourceWeight = 1 - - ''' - Relative (from root directory of plugin) path to image - will shown as source image at result listing - ''' - searchIcon = '/resources/searchers/icons/KinoZalTV.png' - - ''' - Flag indicates is this source - magnet links source or not. - Used for filtration of sources in case of old library (setting selected). - Old libraries won't to convert magnet as torrent file to the storage - ''' - - @property - def isMagnetLinkSource(self): - return False - - ''' - Main method should be implemented for search process. - Receives keyword and have to return dictionary of proper tuples: - filesList.append(( - int(weight),# Calculated global weight of sources - int(seeds),# Seeds count - str(title),# Title will be shown - str(link),# Link to the torrent/magnet - str(image),# Path/URL to image shown at the list - ))''' - - def search(self, keyword): - filesList = [] - url = 'http://kinozal.tv/browse.php?s=%s&g=0&c=0&v=0&d=0&w=0&t=1&f=0' % urllib.quote_plus( - keyword.decode('utf-8').encode('cp1251')) - - headers = {('Origin', 'http://kinozal.tv'), - ('User-Agent', - 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 YaBrowser/14.10.2062.12061 Safari/537.36'), - ('Referer', 'http://kinozal.tv/')} - - response = self.makeRequest(url, headers=headers) - if None != response and 0 < len(response): - response = response.decode('cp1251').encode('utf-8') - # print response - bad_forums = [2, 1, 23, 32, 40, 41] - regex = '''onclick="cat\((\d+)\);".+?(.+?).+?(.+?).+?class='sl_s'>(\d+).+?class='sl_p'>(\d+)''' - for (forum, topic, title, size, seeds, leechers) in re.compile(regex, re.DOTALL).findall(response): - if int(forum) not in bad_forums: - image = sys.modules["__main__"].__root__ + self.searchIcon - link = 'http://kinozal.tv/download.php?id=' + topic - filesList.append(( - int(int(self.sourceWeight) * int(seeds)), - int(seeds), int(leechers), size, - self.unescape(self.stripHtml(title)), - self.__class__.__name__ + '::' + link, - image, - )) - return filesList - - def check_login(self, response=None): - if None != response and 0 < len(response): - if re.compile('').search(response): - print 'KinoZal Not logged!' - self.login() - return False - return True - - def getTorrentFile(self, url): - self.timeout(5) - - content = self.makeRequest(url) - # print content - if not self.check_login(content): - content = self.makeRequest(url) - # print content - - return self.saveTorrentFile(url, content) - - def login(self): - data = { - 'password': 'torrenter', - 'username': 'torrenterpl', - 'returnto:': '' - } - self.makeRequest( - 'http://kinozal.tv/takelogin.php', - data - ) - self.cookieJar.save(ignore_discard=True) - for cookie in self.cookieJar: - uid, passed = None, None - if cookie.name == 'uid': - uid = cookie.value - if cookie.name == 'pass': - passed = cookie.value - if uid and passed: - return 'uid=' + uid + '; pass=' + passed - return False diff --git a/resources/searchers/unused/OpenSharing.py b/resources/searchers/unused/OpenSharing.py deleted file mode 100644 index 31ae4a5..0000000 --- a/resources/searchers/unused/OpenSharing.py +++ /dev/null @@ -1,93 +0,0 @@ -# -*- coding: utf-8 -*- -''' - Torrenter plugin for XBMC - Copyright (C) 2012 Vadim Skorba - vadim.skorba@gmail.com - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -''' - -import urllib -import re -import sys - -import SearcherABC - - -class OpenSharing(SearcherABC.SearcherABC): - ''' - Weight of source with this searcher provided. - Will be multiplied on default weight. - Default weight is seeds number - ''' - sourceWeight = 1 - - ''' - Relative (from root directory of plugin) path to image - will shown as source image at result listing - ''' - searchIcon = '/resources/searchers/icons/OpenSharing.png' - - ''' - Flag indicates is this source - magnet links source or not. - Used for filtration of sources in case of old library (setting selected). - Old libraries won't to convert magnet as torrent file to the storage - ''' - - @property - def isMagnetLinkSource(self): - return False - - ''' - Main method should be implemented for search process. - Receives keyword and have to return dictionary of proper tuples: - filesList.append(( - int(weight),# Calculated global weight of sources - int(seeds),# Seeds count - str(title),# Title will be shown - str(link),# Link to the torrent/magnet - str(image),# Path/URL to image shown at the list - )) - ''' - - def search(self, keyword): - filesList = [] - url = "http://opensharing.org/newsearch.php?search_word=%s&search_type=1&search_place=0&search_cat=0&search_sort=1&search_direction_asc=1" % urllib.quote_plus( - keyword) - headers = [('User-Agent', - 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 YaBrowser/14.10.2062.12061 Safari/537.36'), - ('Referer', 'http://opensharing.org/'), ('Accept-encoding', 'gzip'), ] - - response = self.makeRequest(url, headers=headers) - - if None != response and 0 < len(response): - print response - dat = re.compile( - r'.+?.+?(.+?).+? (\d+).+?alt="leechers".+?>.+? (\d+).+?(.+?). -''' - -import urllib -import re -import sys - -import SearcherABC - - -class RuTrackerOrg(SearcherABC.SearcherABC): - ''' - Weight of source with this searcher provided. - Will be multiplied on default weight. - Default weight is seeds number - ''' - sourceWeight = 2 - - ''' - Relative (from root directory of plugin) path to image - will shown as source image at result listing - ''' - searchIcon = '/resources/searchers/icons/rutracker.org.png' - - ''' - Flag indicates is this source - magnet links source or not. - Used for filtration of sources in case of old library (setting selected). - Old libraries won't to convert magnet as torrent file to the storage - ''' - - @property - def isMagnetLinkSource(self): - return False - - ''' - Main method should be implemented for search process. - Receives keyword and have to return dictionary of proper tuples: - filesList.append(( - int(weight),# Calculated global weight of sources - int(seeds),# Seeds count - str(title),# Title will be shown - str(link),# Link to the torrent/magnet - str(image),# Path/URL to image shown at the list - )) - ''' - - def search(self, keyword): - filesList = [] - url = 'http://rutracker.org/forum/tracker.php?nm=' + urllib.quote_plus(keyword) - - data = {'prev_my': '0', - 'prev_new': '0', - 'prev_oop': '0', - 'o': '10', - 's': '2', - 'f[]': '-1', - 'nm': keyword} - - response = self.makeRequest(url, data=data) - if None != response and 0 < len(response): - response = response.decode('cp1251').encode('utf8') - # print response - if not self.check_login(response): - response = self.makeRequest(url, data=data) - response = response.decode('cp1251').encode('utf8') - # print response - forums = [7, 187, 2090, 2221, 2091, 2092, 2093, 934, 505, 212, 2459, 1235, 185, 22, 941, 1666, 124, 1543, - 376, 709, 1577, 511, 656, 93, 905, 1576, 101, 100, 103, 572, 1670, 2198, 2199, 313, 2201, 312, - 2339, 314, 352, 549, 1213, 2109, 514, 2097, 4, 930, 2365, 1900, 521, 2258, 208, 539, 209, 484, - 822, 921, 922, 1247, 923, 924, 1991, 925, 1165, 1245, 928, 926, 1246, 1250, 927, 1248, 33, 281, - 1386, 1387, 1388, 282, 599, 1105, 1389, 404, 1390, 1642, 1391, 893, 1478, 670, 2107, 294, 1453, - 1475, 46, 2178, 671, 2177, 251, 97, 851, 821, 2076, 98, 56, 1469, 2123, 1280, 876, 752, 1114, - 2380, 1467, 672, 249, 552, 500, 2112, 1327, 1468, 24, 1959, 115, 939, 1481, 113, 882, 1482, 393, - 1569, 373, 1186, 137, 1321, 532, 979, 827, 1484, 1485, 114, 1332, 1495, 255, 256, 1986, 1551, 626, - 262, 1326, 978, 1287, 1188, 1667, 1675, 257, 845, 875, 263, 2073, 550, 2124, 1470, 528, 486, 854, - 2079, 260, 2111, 1608, 1952, 1613, 1614, 1623, 1615, 1630, 2514, 1616, 2014, 1617, 1987, 2171, - 1620, 1621, 1998, 751, 1697, 2004, 2001, 2002, 283, 1997, 2003, 2009, 2010, 2006, 2007, 2005, 259, - 2008, 126, 9, 104, 1535, 91, 1356, 856, 188, 1408, 310, 202, 935, 990, 80, 119, 1530, 175, 79, - 172, 812, 207, 805, 123, 189, 271, 273, 743, 184, 842, 194, 1605, 85, 1144, 595, 1288, 1171, 1694, - 1690, 820, 819, 625, 84, 242, 623, 1417, 1798, 106, 166, 236, 507, 504, 536, 173, 918, 920, 203, - 1243, 1120, 140, 636, 606, 776, 235, 1499, 81, 266, 252, 1102, 1449, 196, 372, 110, 193, 1531, - 237, 265, 181, 1214, 497, 121, 721, 1117, 1359, 387, 134, 195, 2366, 2390, 2391, 2392, 2407, 2393, - 2370, 2394, 2408, 2395, 2396, 2397, 2398, 2399, 2400, 2401, 2402, 2403, 2404, 2405, 2406, 911, - 1691, 704, 1493, 1500, 1574, 1940, 1539, 1939, 823, 1006, 972, 1299, 781, 717, 1300, 1803, 1298, - 825, 1606, 1458, 1463, 1459, 1938, 1461, 718, 1498, 907, 877, 992, 607, 594, 775, 534, 1462, 904, - 1460, 816, 815, 325, 1457, 1301, 1692, 1540, 694, 1949, 1678, 1541, 860, 1941, 1537, 2100, 2102, - 2103, 1242, 2104, 610, 1542, 2335, 1544, 1545, 1546, 1549, 1597, 1552, 1550, 1568, 1553, 1554, - 617, 1555, 2017, 1257, 1258, 2208, 677, 1255, 1479, 1261, 614, 1259, 2065, 1254, 1260, 2209, 2210, - 1547, 1548, 2211, 615, 1581, 1590, 1587, 1594, 1591, 1588, 1596, 1585, 1586, 2078, 1929, 1593, - 1592, 1595, 1556, 1560, 1561, 1653, 1570, 1654, 1655, 1656, 1930, 1931, 1932, 1562, 1563, 1626, - 1564, 1565, 1559, 1566, 1573, 1567] - for (forum, link, title, size, seeds, leechers) in re.compile( - '.+? class=".+?" href="viewtopic\.php\?t=(\d+)">(.+?).+?(.+?).+?class="seedmed".+?(\d+). -''' - -import re -import urllib -import sys - -import SearcherABC - - -class TFileME(SearcherABC.SearcherABC): - ''' - Weight of source with this searcher provided. - Will be multiplied on default weight. - Default weight is seeds number - ''' - sourceWeight = 1 - - ''' - Relative (from root directory of plugin) path to image - will shown as source image at result listing - ''' - searchIcon = '/resources/searchers/icons/TFileME.png' - - ''' - Flag indicates is this source - magnet links source or not. - Used for filtration of sources in case of old library (setting selected). - Old libraries won't to convert magnet as torrent file to the storage - ''' - - @property - def isMagnetLinkSource(self): - return False - - ''' - Main method should be implemented for search process. - Receives keyword and have to return dictionary of proper tuples: - filesList.append(( - int(weight),# Calculated global weight of sources - int(seeds),# Seeds count - str(title),# Title will be shown - str(link),# Link to the torrent/magnet - str(image),# Path/URL to image shown at the list - ))''' - - def search(self, keyword): - filesList = [] - url = 'http://tfile.me/forum/ssearch.php?q=%s' % urllib.quote_plus(keyword.decode('utf-8').encode('cp1251')) - url += '&c=2&f=4&f=1488&f=1379&f=1225&f=1331&f=1248&f=1197&f=1026&f=293&f=1227&f=577&f=298&f=297&f=290&f=299&f=230&f=303&f=292&f=1240&f=304&f=296&f=300&f=1332&f=1324&f=691&f=301&f=294&f=1241&f=498&f=367&f=574&f=1226&f=295&f=189&f=1525&f=1224&f=1388&f=1387&f=1276&f=1889&f=1917&f=1907&f=1908&f=1909&f=1910&f=1911&f=1890&f=1891&f=1892&f=1893&f=1912&f=1899&f=1894&f=1895&f=1903&f=1896&f=1897&f=1898&f=1900&f=1902&f=1901&f=1904&f=1905&f=1906&f=1913&f=15&f=1918&f=1374&f=1946&f=1579&f=1947&f=1242&f=1508&f=1165&f=1166&f=1245&f=1158&f=532&f=1167&f=1159&f=1244&f=1160&f=1173&f=1238&f=1678&f=1161&f=1320&f=1162&f=1246&f=496&f=1164&f=1163&f=1172&f=1243&f=1386&f=1312&f=1536&f=1919&f=1577&f=1989&f=1578&f=1554&f=1537&f=1538&f=1539&f=1540&f=1541&f=1542&f=1543&f=1555&f=1680&f=1544&f=1556&f=1545&f=1546&f=1547&f=1848&f=1548&f=1550&f=1620&f=1920&f=193&f=1968&f=1237&f=1420&f=1036&f=449&f=448&f=447&f=537&f=1170&f=37&f=1921&f=1323&f=1252&f=1685&f=697&f=172&f=311&f=183&f=130&f=1024&f=139&f=1023&f=179&f=392&f=308&f=342&f=1612&f=1015&f=96&f=353&f=997&f=285&f=154&f=1613&f=975&f=168&f=1849&f=1020&f=265&f=123&f=1614&f=1615&f=117&f=155&f=1611&f=1616&f=1617&f=152&f=105&f=312&f=127&f=1030&f=150&f=328&f=305&f=149&f=136&f=134&f=158&f=169&f=1421&f=768&f=767&f=309&f=377&f=1017&f=1590&f=1923&f=1591&f=1966&f=1592&f=1607&f=1593&f=1594&f=1595&f=1596&f=1597&f=1598&f=1599&f=1600&f=1844&f=1601&f=1602&f=1603&f=1604&f=1605&f=1681&f=17&f=1924&f=1415&f=1964&f=1416&f=1304&f=1146&f=1147&f=1156&f=1534&f=1142&f=29&f=85&f=1514&f=1148&f=1515&f=384&f=216&f=1149&f=232&f=1535&f=506&f=1517&f=1516&f=1000&f=1518&f=237&f=243&f=1150&f=244&f=239&f=197&f=236&f=1151&f=235&f=1152&f=234&f=1153&f=1018&f=1143&f=1563&f=1925&f=1564&f=1565&f=1566&f=1567&f=1568&f=1569&f=1570&f=1571&f=1572&f=1574&f=1575&f=1576&f=1926&f=175&f=1881&f=1256&f=1145&f=1140&f=1253&f=1157&f=727&f=1551&f=567&f=1254&f=219&f=568&f=974&f=495&f=743&f=494&f=401&f=731&f=499&f=500&f=538&f=206&f=1040&f=446&f=1005&f=210&f=203&f=207&f=204&f=1255&f=202&f=1141&f=16&f=1927&f=1380&f=1425&f=1438&f=1333&f=187&f=1062&f=1310&f=1059&f=1033&f=1509&f=1193&f=1195&f=1064&f=1063&f=1028&f=1058&f=1019&f=490&f=1397&f=1065&f=1419&f=1194&f=1070&f=274&f=1383&f=1334&f=1067&f=1068&f=1066&f=1069&f=1060&f=1282&f=19&f=1915&f=1872&f=1922&f=1284&f=1294&f=1301&f=1288&f=1291&f=1309&f=39&f=1285&f=1290&f=1306&f=1295&f=1300&f=1302&f=1287&f=1307&f=1292&f=1299&f=1297&f=1293&f=1888&f=1286&f=1298&f=1296&f=1519&f=1303&f=1527&g=&act=&y=&ql=&a=&d=&o=&size_min=0&size_max=0' - headers = {('Origin', 'http://tfile.me'), - ('User-Agent', - 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 YaBrowser/14.10.2062.12061 Safari/537.36'), - ('Referer', 'http://tfile.me/')} - - response = self.makeRequest(url, headers=headers) - if None != response and 0 < len(response): - response = response.decode('cp1251').encode('utf-8') - self.cookieJar.save(ignore_discard=True) - # self.check_login(response) - # print response - # bad_forums = [2,1,23,32,40,41] - regex = '''.+?(.+?).+?(.+?).+?class="sd">(\d+).+?class="lc">(\d+)''' - for (forum, title, link, size, seeds, leechers) in re.compile(regex, re.DOTALL).findall(response): - # if int(forum) not in bad_forums: - title = self.clear_title(title) - image = sys.modules["__main__"].__root__ + self.searchIcon - link = 'http://tfile.me/forum/download.php?id=' + link - filesList.append(( - int(int(self.sourceWeight) * int(seeds)), - int(seeds), int(leechers), size, - title, - self.__class__.__name__ + '::' + link, - image, - )) - return filesList - - def clear_title(self, s): - return self.stripHtml(self.unescape(s)).replace(' ', ' ').replace(' ', ' ').strip() - - def check_login(self, response=None): - if None != response and 0 < len(response): - # print response - if re.compile('. -''' - -import urllib -import re -import sys - -import SearcherABC - - -class ThePirateBaySe(SearcherABC.SearcherABC): - ''' - Weight of source with this searcher provided. - Will be multiplied on default weight. - Default weight is seeds number - ''' - sourceWeight = 1 - - ''' - Relative (from root directory of plugin) path to image - will shown as source image at result listing - ''' - searchIcon = '/resources/searchers/icons/thepiratebay.se.png' - - ''' - Flag indicates is this source - magnet links source or not. - Used for filtration of sources in case of old library (setting selected). - Old libraries won't to convert magnet as torrent file to the storage - ''' - - @property - def isMagnetLinkSource(self): - return True - - ''' - Main method should be implemented for search process. - Receives keyword and have to return dictionary of proper tuples: - filesList.append(( - int(weight),# Calculated global weight of sources - int(seeds),# Seeds count - str(title),# Title will be shown - str(link),# Link to the torrent/magnet - str(image),# Path/URL to image shown at the list - )) - ''' - - def search(self, keyword): - filesList = [] - url = "https://thepiratebay.mn/search/%s/0/99/200" % (urllib.quote_plus(keyword)) - - response = self.makeRequest(url) - - if None != response and 0 < len(response): - # print response - dat = re.compile( - r'