How to use the sickrage.providers.torrent.TorrentProvider.TorrentProvider function in sickrage

To help you get started, we’ve selected a few sickrage examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pymedusa / Medusa / sickbeard / providers / strike.py View on Github external
#
# SickRage 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 SickRage. If not, see .

from sickbeard import logger, tvcache

from sickrage.helper.common import convert_size, try_int
from sickrage.providers.torrent.TorrentProvider import TorrentProvider


class StrikeProvider(TorrentProvider):

    def __init__(self):

        TorrentProvider.__init__(self, "Strike")

        self.public = True
        self.url = 'https://getstrike.net/'
        params = {'RSS': ['x264']}  # Use this hack for RSS search since most results will use this codec
        self.cache = tvcache.TVCache(self, min_time=10, search_params=params)
        self.minseed, self.minleech = 2 * [None]

    def search(self, search_strings, age=0, ep_obj=None):  # pylint: disable=too-many-locals
        results = []
        for mode in search_strings:  # Mode = RSS, Season, Episode
            items = []
            logger.log(u"Search Mode: {}".format(mode), logger.DEBUG)
github pymedusa / Medusa / sickbeard / providers / sceneelite.py View on Github external
# You should have received a copy of the GNU General Public License
# along with SickRage. If not, see .

from __future__ import unicode_literals

import traceback
from requests.compat import urljoin
from requests.utils import dict_from_cookiejar

from sickbeard import logger, tvcache

from sickrage.helper.common import try_int
from sickrage.providers.torrent.TorrentProvider import TorrentProvider


class SceneEliteProvider(TorrentProvider):  # pylint: disable=too-many-instance-attributes

    def __init__(self):

        # Provider Init
        TorrentProvider.__init__(self, 'SceneElite')

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

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

        # URLs
github pymedusa / Medusa / sickbeard / providers / phxbit.py View on Github external
# You should have received a copy of the GNU General Public License
# along with SickRage. If not, see .

import re

from requests.compat import urljoin
from requests.utils import dict_from_cookiejar

from sickbeard import logger, tvcache
from sickbeard.bs4_parser import BS4Parser

from sickrage.helper.common import convert_size, try_int
from sickrage.providers.torrent.TorrentProvider import TorrentProvider


class PhxBitProvider(TorrentProvider):  # pylint: disable=too-many-instance-attributes

    def __init__(self):

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

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

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

        # URLs
        self.url = 'https://phxbit.com'
github pymedusa / Medusa / sickbeard / providers / titansoftv.py View on Github external
# 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 SickRage. If not, see .

import urllib

from sickbeard import logger
from sickbeard import tvcache
from sickbeard.helpers import mapIndexersToShow
from sickrage.helper.exceptions import AuthException
from sickrage.providers.torrent.TorrentProvider import TorrentProvider


class TitansOfTVProvider(TorrentProvider):
    def __init__(self):
        TorrentProvider.__init__(self, 'TitansOfTV')

        self.supports_absolute_numbering = True
        self.api_key = None
        self.ratio = None
        self.cache = TitansOfTVCache(self)
        self.url = 'http://titansof.tv/api/torrents'
        self.download_url = 'http://titansof.tv/api/torrents/%s/download?apikey=%s'

    def seed_ratio(self):
        return self.ratio

    def _check_auth(self):
        if not self.api_key:
            raise AuthException('Your authentication credentials for ' + self.name + ' are missing, check your config.')
github pymedusa / Medusa / sickbeard / providers / bitsoup.py View on Github external
#
# You should have received a copy of the GNU General Public License
# along with SickRage. If not, see .

import re
import traceback
from requests.utils import dict_from_cookiejar

from sickbeard import logger, tvcache
from sickbeard.bs4_parser import BS4Parser

from sickrage.helper.common import convert_size, try_int
from sickrage.providers.torrent.TorrentProvider import TorrentProvider


class BitSoupProvider(TorrentProvider):  # pylint: disable=too-many-instance-attributes

    def __init__(self):

        TorrentProvider.__init__(self, "BitSoup")

        self.urls = {
            'base_url': 'https://www.bitsoup.me',
            'login': 'https://www.bitsoup.me/takelogin.php',
            '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