예제 #1
0
    def __init__(self, name):
        """Initialize the class."""
        self.name = name

        self.anime_only = False
        self.bt_cache_urls = [
            'http://reflektor.karmorra.info/torrent/{info_hash}.torrent',
            'https://asnet.pw/download/{info_hash}/',
            'http://p2pdl.com/download/{info_hash}',
            'http://itorrents.org/torrent/{info_hash}.torrent',
            'http://thetorrent.org/torrent/{info_hash}.torrent',
            'https://cache.torrentgalaxy.org/get/{info_hash}',
            'https://www.seedpeer.me/torrent/{info_hash}',
        ]
        self.cache = tv.Cache(self)
        self.enable_backlog = False
        self.enable_manualsearch = False
        self.enable_daily = False
        self.enabled = False
        self.headers = {'User-Agent': USER_AGENT}
        self.proper_strings = ['PROPER|REPACK|REAL|RERIP']
        self.provider_type = None
        self.public = False
        self.search_fallback = False
        self.search_mode = None
        self.session = MedusaSafeSession(cloudflare=True)
        self.session.headers.update(self.headers)
        self.series = None
        self.supports_absolute_numbering = False
        self.supports_backlog = True
        self.url = ''
        self.urls = {}

        # Ability to override the search separator. As for example anizb is using '*' instead of space.
        self.search_separator = ' '
        self.season_templates = (
            'S{season:0>2}',  # example: 'Series.Name.S03'
        )

        # Use and configure the attribute enable_cookies to show or hide the cookies input field per provider
        self.enable_cookies = False
        self.cookies = ''

        # Paramaters for reducting the daily search results parsing
        self.max_recent_items = 5
        self.stop_at = 3

        # Delay downloads
        self.enable_search_delay = False
        self.search_delay = 480  # minutes
예제 #2
0
    def __init__(self,
                 name,
                 url='',
                 api_key='0',
                 cat_ids=None,
                 default=False,
                 search_mode='eponly',
                 search_fallback=False,
                 enable_daily=True,
                 enable_backlog=False,
                 enable_manualsearch=False):
        """Initialize the class."""
        super(NewznabProvider, self).__init__(name)

        self.url = url
        self.api_key = api_key

        self.default = default

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

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

        self.cat_ids = cat_ids or ['5030', '5040']

        self.torznab = False

        self.params = False
        self.cap_tv_search = []
        self.providers_without_caps = ['gingadaddy', '6box']

        # For now apply the additional season search string for all newznab providers.
        # If we want to limited this per provider, I suggest using a dict, with provider: [list of season templates]
        # construction.
        self.season_templates = (
            'S{season:0>2}',  # example: 'Series.Name S03'
            'Season {season}',  # example: 'Series.Name Season 3'
        )

        self.cache = tv.Cache(self)
예제 #3
0
    def __init__(self):
        """Initialize the class."""
        super(BTDBProvider, self).__init__('BTDB')

        # Credentials
        self.public = True

        # URLs
        self.url = 'https://btdb.eu'
        self.urls = {
            'daily': urljoin(self.url, 'recent'),
        }

        # Miscellaneous Options

        # Cache
        self.cache = tv.Cache(self, min_time=20)
예제 #4
0
    def __init__(self):
        """Initialize the class."""
        super(EztvProvider, self).__init__('Eztv')

        # Credentials
        self.public = True

        # URLs
        self.url = 'https://eztv.re'
        self.urls = {'api': urljoin(self.url, 'api/get-torrents')}

        # Proper Strings

        # Miscellaneous Options

        # Cache
        self.cache = tv.Cache(self, min_time=15)
예제 #5
0
    def __init__(self):
        """Initialize the class."""
        super(GimmePeersProvider, self).__init__('GimmePeers')

        self.username = None
        self.password = None

        self.url = 'https://www.gimmepeers.com'
        self.urls = {
            'login': urljoin(self.url, 'takelogin.php'),
            'search': urljoin(self.url, 'browse.php'),
        }

        # Proper Strings
        self.proper_strings = ['PROPER', 'REPACK', 'REAL', 'RERIP']

        self.cache = tv.Cache(self)
예제 #6
0
파일: nyaa.py 프로젝트: 5l1v3r1/Medusa-2
    def __init__(self):
        """Initialize the class."""
        super(NyaaProvider, self).__init__('Nyaa')

        # Credentials
        self.public = True

        # URLs
        self.url = 'https://nyaa.si'

        # Proper Strings

        # Miscellaneous Options
        self.supports_absolute_numbering = True
        self.confirmed = False

        # Cache
        self.cache = tv.Cache(self, min_time=20)
예제 #7
0
    def __init__(self):
        """Initialize the class."""
        super(ThePirateBayProvider, self).__init__('ThePirateBay')

        # Credentials
        self.public = True

        # URLs
        self.url = 'https://thepiratebay.org'
        self.custom_url = None

        # Proper Strings

        # Miscellaneous Options
        self.confirmed = True

        # Cache
        self.cache = tv.Cache(self, min_time=20)
예제 #8
0
    def __init__(self):
        """Initialize the class."""
        super(BitCannonProvider, self).__init__('BitCannon')

        # Credentials
        self.api_key = None

        # URLs
        self.url = 'http://localhost:3000/'
        self.custom_url = None

        # Proper Strings

        # Miscellaneous Options

        # Cache
        cache_params = {'RSS': ['tv', 'anime']}
        self.cache = tv.Cache(self, search_params=cache_params)
예제 #9
0
    def __init__(self):
        """Initialize the class."""
        super(BTNProvider, self).__init__('BTN')

        # Credentials
        self.api_key = None

        # URLs
        self.url = 'https://broadcasthe.net'
        self.urls = {
            'base_url': 'https://api.broadcasthe.net',
        }

        # Miscellaneous Options
        self.supports_absolute_numbering = True

        # Cache
        self.cache = tv.Cache(self, min_time=15)
예제 #10
0
파일: anidex.py 프로젝트: 5l1v3r1/Medusa-2
    def __init__(self):
        """Initialize the class."""
        super(AniDexProvider, self).__init__('AniDex')

        # Credentials
        self.public = True

        # URLs
        self.url = 'https://anidex.info'
        self.urls = {
            'search': self.url,
        }

        # Miscellaneous Options
        self.supports_absolute_numbering = True

        # Cache
        self.cache = tv.Cache(self, min_time=20)
예제 #11
0
    def __init__(self, name):
        """Initialize the class."""
        self.name = name

        self.anime_only = False
        self.bt_cache_urls = [
            'http://reflektor.karmorra.info/torrent/{info_hash}.torrent',
            'https://torrent.cd/torrents/download/{info_hash}/.torrent',
            'https://asnet.pw/download/{info_hash}/',
            'http://p2pdl.com/download/{info_hash}',
            'http://itorrents.org/torrent/{info_hash}.torrent',
        ]
        self.cache = tv.Cache(self)
        self.enable_backlog = False
        self.enable_manualsearch = False
        self.enable_daily = False
        self.enabled = False
        self.headers = {'User-Agent': USER_AGENT}
        self.proper_strings = ['PROPER|REPACK|REAL|RERIP']
        self.provider_type = None
        self.public = False
        self.search_fallback = False
        self.search_mode = None
        self.session = MedusaSafeSession(hooks=[cloudflare])
        self.session.headers.update(self.headers)
        self.show = None
        self.supports_absolute_numbering = False
        self.supports_backlog = True
        self.url = ''
        self.urls = {}
        # Ability to override the search separator. As for example anizb is using '*' instead of space.
        self.search_separator = ' '

        # Use and configure the attribute enable_cookies to show or hide the cookies input field per provider
        self.enable_cookies = False
        self.cookies = ''

        # Paramaters for reducting the daily search results parsing
        self.max_recent_items = 5
        self.stop_at = 3

        # Police attributes
        self.enable_api_hit_cooldown = False
        self.enable_daily_request_reserve = False
예제 #12
0
    def __init__(self):
        """Initialize the class."""
        super(TorrentDayProvider, self).__init__('TorrentDay')

        # URLs
        self.url = 'https://www.torrentday.com'
        self.urls = {
            'login': urljoin(self.url, '/torrents/'),
            'search': urljoin(self.url, '/t.json'),
            'download': urljoin(self.url, '/download.php/')
        }

        # Proper Strings

        # Miscellaneous Options
        self.freeleech = False
        self.enable_cookies = True
        self.cookies = ''
        self.required_cookies = ('uid', 'pass')

        # TV/480p - 24
        # TV/Bluray - 32
        # TV/DVD-R - 31
        # TV/DVD-Rip - 33
        # TV/Mobile - 46
        # TV/Packs - 14
        # TV/SD/x264 - 26
        # TV/x264 - 7
        # TV/x265 - 34
        # TV/XviD - 2

        self.categories = {
            'Season': {'14': 1},
            'Episode': {'2': 1, '26': 1, '7': 1, '24': 1, '34': 1},
            'RSS': {'2': 1, '26': 1, '7': 1, '24': 1, '34': 1, '14': 1}
        }

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

        # Cache
        self.cache = tv.Cache(self, min_time=10)
예제 #13
0
파일: torznab.py 프로젝트: reconman/Medusa
    def __init__(self,
                 name,
                 url=None,
                 api_key=None,
                 cat_ids=None,
                 cap_tv_search=None,
                 search_mode='eponly',
                 search_fallback=False,
                 enable_daily=True,
                 enable_backlog=False,
                 enable_manualsearch=False,
                 manager=None):
        """Initialize the class."""
        super(TorznabProvider, self).__init__(name)

        self.provider_sub_type = GenericProvider.TORZNAB

        self.url = url or ''
        self.api_key = api_key or ''
        self.cat_ids = cat_ids or ['5010', '5030', '5040', '7000']
        self.cap_tv_search = cap_tv_search or []
        self.search_mode = search_mode
        self.search_fallback = search_fallback
        self.enable_daily = enable_daily
        self.enable_backlog = enable_backlog
        self.enable_manualsearch = enable_manualsearch

        # For now apply the additional season search string for all torznab providers.
        # If we want to limited this per provider, I suggest using a dict, with provider: [list of season templates]
        # construction.
        self.season_templates = (
            'S{season:0>2}',  # example: 'Series.Name S03'
            'Season {season}',  # example: 'Series.Name Season 3'
        )

        # Proper Strings
        self.proper_strings = ['PROPER', 'REPACK', 'REAL', 'RERIP']

        # Specify the manager if externally managed.
        self.manager = manager
        self.id_manager = self.name

        self.cache = tv.Cache(self)
예제 #14
0
파일: btdb.py 프로젝트: tortfeaser/Medusa
    def __init__(self):
        """Initialize the class."""
        super(BTDBProvider, self).__init__('BTDB')

        # Credentials
        self.public = True

        # URLs
        self.url = 'https://btdb.to'
        self.urls = {
            'daily': urljoin(self.url, '/q/x264/?sort=time'),
            'search': urljoin(self.url, '/q/{query}/{page}?sort=popular'),
        }

        # Miscellaneous Options
        self.max_pages = 3

        # Cache
        self.cache = tv.Cache(self, min_time=20)
예제 #15
0
    def __init__(self):
        """Initialize the class."""
        super(IPTorrentsProvider, self).__init__('IPTorrents')

        # URLs
        self.url = 'https://iptorrents.me'

        # Proper Strings

        # Miscellaneous Options
        self.freeleech = False
        self.enable_cookies = True
        self.cookies = ''
        self.required_cookies = ('uid', 'pass')
        self.categories = '73=&60='
        self.custom_url = None

        # Cache
        self.cache = tv.Cache(self)
예제 #16
0
    def __init__(self, name):
        """Initialize the class."""
        self.name = name

        self.anime_only = False
        self.bt_cache_urls = [
            'http://itorrents.org/torrent/{info_hash}.torrent',
            'https://torrentproject.se/torrent/{info_hash}.torrent',
            'http://reflektor.karmorra.info/torrent/{info_hash}.torrent',
            'http://thetorrent.org/torrent/{info_hash}.torrent',
            'https://torcache.pro/{info_hash}.torrent',
            'http://piratepublic.com/download.php?id={info_hash}',
            'http://www.legittorrents.info/download.php?id={info_hash}',
            'https://torrent.cd/torrents/download/{info_hash}/.torrent',
            'https://asnet.pw/download/{info_hash}/',
        ]
        self.cache = tv.Cache(self)
        self.enable_backlog = False
        self.enable_manualsearch = False
        self.enable_daily = False
        self.enabled = False
        self.headers = {'User-Agent': UA_POOL.random}
        self.proper_strings = ['PROPER|REPACK|REAL|RERIP']
        self.provider_type = None
        self.public = False
        self.search_fallback = False
        self.search_mode = None
        self.session = make_session()
        self.show = None
        self.supports_absolute_numbering = False
        self.supports_backlog = True
        self.url = ''
        self.urls = {}
        # Ability to override the search separator. As for example anizb is using '*' instead of space.
        self.search_separator = ' '

        # Use and configure the attribute enable_cookies to show or hide the cookies input field per provider
        self.enable_cookies = False
        self.cookies = ''

        # Paramaters for reducting the daily search results parsing
        self.max_recent_items = 5
        self.stop_at = 3
예제 #17
0
    def __init__(self):
        """Initialize the class."""
        super(TorrentDayProvider, self).__init__('TorrentDay')

        # Credentials
        self.username = None
        self.password = None

        # URLs
        self.url = 'https://www.torrentday.com'
        self.urls = {
            'login': urljoin(self.url, '/torrents/'),
            'search': urljoin(self.url, '/V3/API/API.php'),
            'download': urljoin(self.url, '/download.php/')
        }

        # Proper Strings

        # Miscellaneous Options
        self.freeleech = False
        self.enable_cookies = True
        self.cookies = ''

        # TV/480p - 24
        # TV/Bluray - 32
        # TV/DVD-R - 31
        # TV/DVD-Rip - 33
        # TV/Mobile - 46
        # TV/Packs - 14
        # TV/SD/x264 - 26
        # TV/x264 - 7
        # TV/x265 - 34
        # TV/XviD - 2

        self.categories = {'Season': {'c14': 1}, 'Episode': {'c2': 1, 'c7': 1, 'c24': 1, 'c26': 1, 'c31': 1, 'c32': 1, 'c33': 1, 'c34': 1, 'c46': 1},
                           'RSS': {'c2': 1, 'c26': 1, 'c7': 1, 'c24': 1, 'c14': 1}}

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

        # Cache
        self.cache = tv.Cache(self, min_time=10)  # Only poll IPTorrents every 10 minutes max
예제 #18
0
    def __init__(self):
        """Initialize the class."""
        super(YggtorrentProvider, self).__init__('Yggtorrent')

        # Credentials
        self.username = None
        self.password = None

        # URLs
        self.url = 'https://yggtorrent.is'
        self.urls = {
            'login': urljoin(self.url, 'user/login'),
            'search': urljoin(self.url, 'engine/search'),
            'download': urljoin(self.url, 'engine/download_torrent?id={0}')
        }

        # Proper Strings
        self.proper_strings = ['PROPER', 'REPACK', 'REAL', 'RERIP']

        # Miscellaneous Options
        self.translation = {
            'à l\'instant': 'just now',
            'seconde': 'second',
            'secondes': 'seconds',
            'minute': 'minute',
            'minutes': 'minutes',
            'heure': 'hour',
            'heures': 'hours',
            'jour': 'day',
            'jours': 'days',
            'mois': 'month',
            'an': 'year',
            'année': 'year',
            'ans': 'years',
            'années': 'years'
        }

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

        # Cache
        self.cache = tv.Cache(self, min_time=20)
예제 #19
0
    def __init__(self, name):
        """Initialize the class."""
        self.name = name

        self.anime_only = False
        self.cache = tv.Cache(self)
        self.enable_backlog = False
        self.enable_manualsearch = False
        self.enable_daily = False
        self.enabled = False
        self.headers = {'User-Agent': USER_AGENT}
        self.proper_strings = ['PROPER|REPACK|REAL|RERIP']
        self.provider_type = None  # generic type. For ex: nzb or torrent
        self.provider_sub_type = None  # specific type. For ex: neznab or torznab
        self.public = False
        self.search_fallback = False
        self.search_mode = None
        self.session = ProviderSession(cloudflare=True)
        self.session.headers.update(self.headers)
        self.series = None
        self.supports_absolute_numbering = False
        self.supports_backlog = True
        self.url = ''
        self.urls = {}

        # Ability to override the search separator. As for example anizb is using '*' instead of space.
        self.search_separator = ' '
        self.season_templates = (
            'S{season:0>2}',  # example: 'Series.Name.S03'
        )

        # Use and configure the attribute enable_cookies to show or hide the cookies input field per provider
        self.enable_cookies = False
        self.cookies = ''

        # Paramaters for reducting the daily search results parsing
        self.max_recent_items = 5
        self.stop_at = 3

        # Delay downloads
        self.enable_search_delay = False
        self.search_delay = 480  # minutes
예제 #20
0
파일: anizb.py 프로젝트: fernandog/Medusa
    def __init__(self):
        """Initialize the class."""
        super(Anizb, self).__init__('Anizb')

        # Credentials
        self.public = True

        # URLs
        self.url = 'https://anizb.org/'
        self.urls = {'rss': self.url, 'api': urljoin(self.url, 'api/?q=')}

        # Proper Strings

        # Miscellaneous Options
        self.supports_absolute_numbering = True
        self.anime_only = True
        self.search_separator = '*'

        # Cache
        self.cache = tv.Cache(self)
예제 #21
0
파일: zooqle.py 프로젝트: 5l1v3r1/Medusa-2
    def __init__(self):
        """Initialize the class."""
        super(ZooqleProvider, self).__init__('Zooqle')

        # Credentials
        self.public = True

        # URLs
        self.url = 'https://zooqle.com'
        self.urls = {
            'search': urljoin(self.url, '/search'),
        }

        # Proper Strings
        self.proper_strings = ['PROPER', 'REPACK', 'REAL']

        # Miscellaneous Options

        # Cache
        self.cache = tv.Cache(self, min_time=15)
예제 #22
0
    def __init__(self):
        """Initialize the class."""
        super(ShanaProjectProvider, self).__init__('ShanaProject')

        # Credentials
        self.public = True

        # URLs
        self.url = 'https://www.shanaproject.com/'
        self.urls = {
            'search': urljoin(self.url, '/search/{page}/'),
        }

        # Miscellaneous Options
        self.max_pages = 3  # Max return 150 results for 3 pages.
        self.supports_absolute_numbering = True
        self.anime_only = True

        # Cache
        self.cache = tv.Cache(self, min_time=20)
예제 #23
0
    def __init__(self):
        """Initialize the class."""
        super(HorribleSubsProvider, self).__init__('HorribleSubs')

        # Credentials
        self.public = True

        # URLs
        self.url = 'http://horriblesubs.info'
        self.urls = {
            'daily': urljoin(self.url, '/lib/latest.php'),
            'search': urljoin(self.url, '/lib/search.php'),
        }

        # Miscellaneous Options
        self.supports_absolute_numbering = True
        self.anime_only = True

        # Cache
        self.cache = tv.Cache(self, min_time=20)
예제 #24
0
파일: beyondhd.py 프로젝트: warrmr/Medusa
    def __init__(self):
        """Initialize the class."""
        super(BeyondHDProvider, self).__init__('Beyond-HD')

        self.username = None
        self.password = None

        self.url = 'https://beyond-hd.me'
        self.urls = {
            'login': urljoin(self.url, 'login'),
            'search': urljoin(self.url, 'torrents'),
        }

        # Proper Strings
        self.proper_strings = ['PROPER', 'REPACK', 'REAL', 'RERIP']

        # Miscellaneous Options

        # Cache
        self.cache = tv.Cache(self)
예제 #25
0
파일: newznab.py 프로젝트: fernandog/Medusa
    def __init__(self,
                 name,
                 url,
                 key='0',
                 cat_ids='5030,5040',
                 search_mode='eponly',
                 search_fallback=False,
                 enable_daily=True,
                 enable_backlog=False,
                 enable_manualsearch=False):
        """Initialize the class."""
        super(NewznabProvider, self).__init__(name)

        self.url = url
        self.key = key

        self.search_mode = search_mode
        self.search_fallback = search_fallback
        self.enable_daily = enable_daily
        self.enable_manualsearch = enable_manualsearch
        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.cat_ids = cat_ids if cat_ids else '5030,5040'

        self.torznab = False

        self.default = False

        self.caps = False
        self.cap_tv_search = None
        self.force_query = False
        self.providers_without_caps = ['gingadaddy', '6box']
        # self.cap_search = None
        # self.cap_movie_search = None
        # self.cap_audio_search = None

        self.cache = tv.Cache(self)
예제 #26
0
    def __init__(self):
        """Initialize the class."""
        super(BeyondHDProvider, self).__init__('Beyond-HD')

        self.enable_cookies = True
        self.cookies = ''
        self.required_cookies = ('remember_web_[**long_hash**]', )

        self.url = 'https://beyond-hd.me'
        self.urls = {
            'login': urljoin(self.url, 'login'),
            'search': urljoin(self.url, 'torrents'),
        }

        # Proper Strings
        self.proper_strings = ['PROPER', 'REPACK', 'REAL', 'RERIP']

        # Miscellaneous Options

        # Cache
        self.cache = tv.Cache(self)
예제 #27
0
    def __init__(self):
        """Initialize the class."""
        super(BinSearchProvider, self).__init__('BinSearch')

        # Credentials
        self.public = True

        # URLs
        self.url = 'https://www.binsearch.info'
        self.urls = {
            'search': urljoin(self.url, 'index.php'),
            'rss': urljoin(self.url, 'browse.php')
        }

        # Proper Strings
        self.proper_strings = ['PROPER', 'REPACK', 'REAL', 'RERIP']

        # Miscellaneous Options

        # Cache
        self.cache = tv.Cache(self, min_time=10)
예제 #28
0
    def __init__(self):
        """Initialize the class."""
        super(TorrentingProvider, self).__init__('Torrenting')

        # URLs
        self.url = 'https://www.torrenting.com/'
        self.urls = {
            'login': urljoin(self.url, 'login.php'),
            'search': urljoin(self.url, 'browse.php'),
        }

        # Proper Strings
        self.proper_strings = ['PROPER', 'REPACK', 'REAL', 'RERIP']

        # Miscellaneous Options
        self.enable_cookies = True
        self.cookies = ''
        self.required_cookies = ('uid', 'pass')

        # Cache
        self.cache = tv.Cache(self)
예제 #29
0
    def __init__(self):
        """Initialize the class."""
        super(BitCannonProvider, self).__init__('BitCannon')

        # Credentials
        self.api_key = None

        # URLs
        self.custom_url = None

        # Proper Strings

        # Miscellaneous Options

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

        # Cache
        cache_params = {'RSS': ['tv', 'anime']}
        self.cache = tv.Cache(self, search_params=cache_params)
예제 #30
0
파일: hdspace.py 프로젝트: 5l1v3r1/Medusa-2
    def __init__(self):
        """Initialize the class."""
        super(HDSpaceProvider, self).__init__('HDSpace')

        # Credentials
        self.username = None
        self.password = None

        # URLs
        self.url = 'https://hd-space.org'
        self.urls = {
            'login': urljoin(self.url, 'index.php?page=login'),
            'search': urljoin(self.url, 'index.php'),
        }

        # Proper Strings

        # Miscellaneous Options

        # Cache
        self.cache = tv.Cache(self)