예제 #1
0
파일: generic.py 프로젝트: brok21k/SickRage
    def __init__(self, name):

        # these need to be set in the subclass
        self.providerType = None
        self.name = name
        self.url = ''

        self.show = None

        self.supportsBacklog = False
        self.supportsAbsoluteNumbering = False
        self.anime_only = False

        self.search_mode = None
        self.search_fallback = False
        self.backlog_only = False

        self.cache = tvcache.TVCache(self)

        self.session = requests.session()
        self.session.verify = False
        self.session.headers.update({
            'user-agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36'})
예제 #2
0
    def __init__(self):

        TorrentProvider.__init__(self, "IPTorrents")

        self.username = None
        self.password = None
        self.freeleech = False
        self.minseed = None
        self.minleech = None
        self.custom_url = None

        self.cache = tvcache.TVCache(
            self, min_time=10)  # Only poll IPTorrents every 10 minutes max

        self.urls = {
            'base_url': 'https://iptorrents.eu',
            'login': '******',
            'search': 'https://iptorrents.eu/t?%s%s&q=%s&qf=#torrents'
        }

        self.url = self.urls['base_url']

        self.categories = '73=&60='
예제 #3
0
    def __init__(self):

        # Provider Init
        TorrentProvider.__init__(self, "TorrentProject")

        # Credentials
        self.public = True

        # Torrent Stats
        self.ratio = 0
        self.minseed = None
        self.minleech = None

        # URLs
        self.urls = {'api': u'https://torrentproject.se/', }
        self.url = self.urls['api']
        self.custom_url = None
        self.headers.update({'User-Agent': USER_AGENT})

        # Proper Strings

        # Cache
        self.cache = tvcache.TVCache(self, search_params={'RSS': ['0day']})
예제 #4
0
    def __init__(self):

        TorrentProvider.__init__(self, "BTDigg")

        self.public = True
        self.ratio = 0
        self.urls = {
            'url': u'https://btdigg.org/',
            'api': u'https://api.btdigg.org/api/private-341ada3245790954/s02'
        }

        self.proper_strings = ['PROPER', 'REPACK']

        self.url = self.urls['url']

        # # Unsupported
        # self.minseed = 1
        # self.minleech = 0

        # Use this hacky way for RSS search since most results will use this codecs
        params = {'RSS': ['x264', 'x264.HDTV', '720.HDTV.x264']}
        # Only poll BTDigg every 30 minutes max, since BTDigg takes some time to crawl
        self.cache = tvcache.TVCache(self, min_time=30, search_params=params)
예제 #5
0
    def __init__(self):

        TorrentProvider.__init__(self, "SceneTime")

        self.username = None
        self.password = None
        self.minseed = None
        self.minleech = None

        self.cache = tvcache.TVCache(
            self)  # only poll SceneTime every 20 minutes max

        self.urls = {
            'base_url': 'https://www.scenetime.com',
            'login': '******',
            'detail': 'https://www.scenetime.com/details.php?id=%s',
            'search': 'https://www.scenetime.com/browse.php?search=%s%s',
            'download': 'https://www.scenetime.com/download.php/%s/%s'
        }

        self.url = self.urls['base_url']

        self.categories = "&c2=1&c43=13&c9=1&c63=1&c77=1&c79=1&c100=1&c101=1"
예제 #6
0
    def __init__(self):

        TorrentProvider.__init__(self, "Pretome")

        self.username = None
        self.password = None
        self.pin = None
        self.minseed = None
        self.minleech = None

        self.urls = {'base_url': 'https://pretome.info',
                     'login': '******',
                     'detail': 'https://pretome.info/details.php?id=%s',
                     'search': 'https://pretome.info/browse.php?search=%s%s',
                     'download': 'https://pretome.info/download.php/%s/%s.torrent'}

        self.url = self.urls['base_url']

        self.categories = "&st=1&cat%5B%5D=7"

        self.proper_strings = ['PROPER', 'REPACK']

        self.cache = tvcache.TVCache(self)
예제 #7
0
    def __init__(self):

        TorrentProvider.__init__(self, "BitSoup")

        self.urls = {
            'base_url': 'https://www.bitsoup.me',
            'login': '******',
            'detail': 'https://www.bitsoup.me/details.php?id=%s',
            'search': 'https://www.bitsoup.me/browse.php',
            'download': 'https://bitsoup.me/%s',
        }

        self.url = self.urls['base_url']

        self.username = None
        self.password = None
        self.ratio = None
        self.minseed = None
        self.minleech = None

        self.cache = tvcache.TVCache(self)

        self.search_params = {"c42": 1, "c45": 1, "c49": 1, "c7": 1}
예제 #8
0
    def __init__(self):

        TorrentProvider.__init__(self, "SceneTime")

        self.username = None
        self.password = None
        self.minseed = None
        self.minleech = None

        self.cache = tvcache.TVCache(
            self)  # only poll SceneTime every 20 minutes max

        self.urls = {
            'base_url': 'https://www.scenetime.com',
            'login': '******',
            'detail': 'https://www.scenetime.com/details.php?id=%s',
            'apisearch': 'https://www.scenetime.com/browse_API.php',
            'download': 'https://www.scenetime.com/download.php/%s/%s'
        }

        self.url = self.urls['base_url']

        self.categories = [2, 42, 9, 63, 77, 79, 100, 83]
예제 #9
0
    def __init__(self):

        TorrentProvider.__init__(self, "HoundDawgs")

        self.username = None
        self.password = None
        self.ratio = None
        self.minseed = None
        self.minleech = None
        self.freeleech = None
        self.ranked = None

        self.urls = {
            'base_url': 'https://hounddawgs.org/',
            'search': 'https://hounddawgs.org/torrents.php',
            'login': '******'
        }

        self.url = self.urls['base_url']

        self.search_params = {
            "filter_cat[85]": 1,
            "filter_cat[58]": 1,
            "filter_cat[57]": 1,
            "filter_cat[74]": 1,
            "filter_cat[92]": 1,
            "filter_cat[93]": 1,
            "order_by": "s3",
            "order_way": "desc",
            "type": '',
            "userid": '',
            "searchstr": '',
            "searchimdb": '',
            "searchtags": ''
        }

        self.cache = tvcache.TVCache(self)
예제 #10
0
    def __init__(self):

        # Provider Init
        TorrentProvider.__init__(self, "ThePirateBay")

        # Credentials
        self.public = True

        # Torrent Stats
        self.minseed = None
        self.minleech = None
        self.confirmed = True

        # URLs
        self.url = "https://thepiratebay.org"
        self.api = "https://apibay.org"
        self.queries = {'top': ['top100:208', 'top100:205']}
        self.script_url = "https://torrindex.net/static/main.js"

        # "https://apibay.org/precompiled/data_top100_48h_205.json"
        # "https://apibay.org/precompiled/data_top100_48h_208.json"
        #
        # "https://apibay.org/q.php?q=Arrow S08E08&cat=205,208"
        # "https://apibay.org/q.php?q=tt2193021&cats=205,208"

        self.urls = {
            "search":
            urljoin(self.api, "q.php"),
            "rss": [
                urljoin(self.api, "precompiled/data_top100_48h_208.json"),
                urljoin(self.api, "precompiled/data_top100_48h_205.json")
            ]
        }

        # Cache
        self.cache = tvcache.TVCache(
            self, min_time=30)  # only poll ThePirateBay every 30 minutes max
예제 #11
0
    def __init__(self,
                 name,
                 url,
                 key='0',
                 catIDs='5030,5040',
                 search_mode='eponly',
                 search_fallback=False,
                 enable_daily=True,
                 enable_backlog=False):

        NZBProvider.__init__(self, name)

        self.url = url
        self.key = key

        self.search_mode = search_mode
        self.search_fallback = search_fallback
        self.enable_daily = enable_daily
        self.enable_backlog = enable_backlog

        # 0 in the key spot indicates that no key is needed
        self.needs_auth = self.key != '0'
        self.public = not self.needs_auth

        self.catIDs = catIDs if catIDs else '5030,5040'

        self.default = False

        self.caps = False
        self.cap_tv_search = None
        # self.cap_search = None
        # self.cap_movie_search = None
        # self.cap_audio_search = None

        self.cache = tvcache.TVCache(
            self,
            min_time=30)  # only poll newznab providers every 30 minutes max
예제 #12
0
    def __init__(self, name):
        # these need to be set in the subclass
        self.providerType = None
        self.name = name

        self.proxy = ProviderProxy()
        self.proxyGlypeProxySSLwarning = None
        self.urls = {}
        self.url = ''

        self.show = None

        self.supportsBacklog = False
        self.supportsAbsoluteNumbering = False
        self.anime_only = False

        self.search_mode = None
        self.search_fallback = False

        self.enabled = False
        self.enable_daily = False
        self.enable_backlog = False

        self.cache = tvcache.TVCache(self)

        self.session = requests.Session()

        self.headers = {'User-Agent': USER_AGENT}

        self.btCacheURLS = [
                'http://torcache.net/torrent/{torrent_hash}.torrent',
                'http://zoink.ch/torrent/{torrent_name}.torrent',
                'http://torrage.com/torrent/{torrent_hash}.torrent',
                #'http://itorrents.org/torrent/{torrent_hash}.torrent',
            ]

        random.shuffle(self.btCacheURLS)
예제 #13
0
    def __init__(self):

        TorrentProvider.__init__(self, "ncore.cc")
        self.username = None
        self.password = None
        self.minseed = None
        self.minleech = None
        categories = [
            'xvidser_hun', 'xvidser', 'dvd_hun', 'dvd', 'dvd9_hun', 'dvd9',
            'hd_hun', 'hd'
        ]
        categories = '&'.join(
            ['kivalasztott_tipus[]=' + x for x in categories])
        self.url = 'https://ncore.cc/'
        self.urls = {
            'login':
            '******',
            'search':
            ('https://ncore.cc/torrents.php?{cats}&mire=%s&miben=name'
             '&tipus=kivalasztottak_kozott&submit.x=0&submit.y=0&submit=Ok'
             '&tags=&searchedfrompotato=true&jsons=true').format(
                 cats=categories),
        }
        self.cache = tvcache.TVCache(self)
예제 #14
0
    def __init__(self):

        TorrentProvider.__init__(self, "T411")

        self.username = None
        self.password = None
        self.token = None
        self.tokenLastUpdate = None

        self.cache = tvcache.TVCache(self, min_time=10)  # Only poll T411 every 10 minutes max

        self.urls = {'base_url': 'https://www.t411.ch/',
                     'search': 'https://api.t411.ch/torrents/search/%s*?cid=%s&limit=100',
                     'rss': 'https://api.t411.ch/torrents/top/today',
                     'login_page': 'https://api.t411.ch/auth',
                     'download': 'https://api.t411.ch/torrents/download/%s'}

        self.url = self.urls['base_url']

        self.subcategories = [433, 637, 455, 639]

        self.minseed = 0
        self.minleech = 0
        self.confirmed = False
예제 #15
0
    def __init__(self):

        TorrentProvider.__init__(self, "FreshOnTV")

        self._uid = None
        self._hash = None
        self.username = None
        self.password = None
        self.ratio = None
        self.minseed = None
        self.minleech = None
        self.freeleech = False

        self.cache = tvcache.TVCache(self)

        self.urls = {'base_url': 'https://freshon.tv/',
                     'login': '******',
                     'detail': 'https://freshon.tv/details.php?id=%s',
                     'search': 'https://freshon.tv/browse.php?incldead=%s&words=0&cat=0&search=%s',
                     'download': 'https://freshon.tv/download.php?id=%s&type=torrent'}

        self.url = self.urls['base_url']

        self.cookies = None