Exemplo n.º 1
0
 def __init__(self):
     self.headers = {
         'X-Plex-Device-Name': 'SickChill',
         'X-Plex-Product': 'SickChill Notifier',
         'X-Plex-Client-Identifier': sickchill.oldbeard.common.USER_AGENT,
         'X-Plex-Version': '2016.02.10'
     }
     self.session = make_session()
Exemplo n.º 2
0
 def __init__(self):
     self.headers = {
         "X-Plex-Device-Name": "SickChill",
         "X-Plex-Product": "SickChill Notifier",
         "X-Plex-Client-Identifier": sickchill.oldbeard.common.USER_AGENT,
         "X-Plex-Version": "2016.02.10",
     }
     self.session = make_session()
Exemplo n.º 3
0
    def __init__(self):

        self.branch = settings.BRANCH
        if settings.BRANCH == "":
            self.branch = self._find_installed_branch()

        self._cur_commit_hash = settings.CUR_COMMIT_HASH
        self._newest_commit_hash = None
        self._num_commits_behind = 0

        self.session = helpers.make_session()
Exemplo n.º 4
0
    def __init__(self):
        """Gets a list of most popular TV series from imdb"""
        self.session = helpers.make_session()

        self.imdb = imdb.IMDb()
        try:
            self.imdb.topBottomProxy.tvmeter100_parser.rules[
                0].extractor.rules.append(
                    Rule(key='cover url',
                         extractor=Path(
                             './td[@class="posterColumn"]/a/img/@src')))
        except Exception:
            pass
Exemplo n.º 5
0
    def __init__(self):
        self.updater = None
        self.install_type = None
        self.amActive = False
        if settings.gh:
            self.install_type = self.find_install_type()
            if self.install_type == 'git':
                self.updater = GitUpdateManager()
            elif self.install_type == 'source':
                self.updater = SourceUpdateManager()
            elif self.install_type == 'pip':
                self.updater = PipUpdateManager()

        self.session = helpers.make_session()
Exemplo n.º 6
0
    def __init__(self):
        """Gets a list of most popular TV series from imdb"""

        self.base_url = 'https://imdb.com'
        self.url = urljoin(self.base_url, 'search/title')

        self.params = {
            'at': 0,
            'sort': 'moviemeter',
            'title_type': 'tv_series',
            'year': '{0},{1}'.format(date.today().year - 1,
                                     date.today().year + 1)
        }

        self.session = helpers.make_session()
Exemplo n.º 7
0
    def __init__(self, name, host=None, username=None, password=None):
        """
        Initializes the client
        :name: str:name of the client
        :host: str:url or ip of the client
        :username: str: username for authenticating with the client
        :password: str: password for authentication with the client
        """

        self.name = name
        self.username = username or settings.TORRENT_USERNAME
        self.password = password or settings.TORRENT_PASSWORD
        self.host = host or settings.TORRENT_HOST

        self.url = None
        self.response = None
        self.auth = None
        self.last_time = time.time()
        self.session = helpers.make_session()
        self.session.auth = (self.username, self.password)
Exemplo n.º 8
0
    def __init__(self, name):
        self.name = name

        self.anime_only = False
        self.bt_cache_urls = [
            # 'http://torcache.net/torrent/{torrent_hash}.torrent',
            # 'http://torrentproject.se/torrent/{torrent_hash}.torrent',
            'http://thetorrent.org/torrent/{torrent_hash}.torrent',
            # 'http://btdig.com/torrent/{torrent_hash}.torrent',
            ('https://torrage.info/download?h={torrent_hash}',
             'https://torrage.info/torrent.php?h={torrent_hash}'),
            'https://itorrents.org/torrent/{torrent_hash}.torrent?title={torrent_name}'
        ]
        self.cache = TVCache(self)
        self.enable_backlog = False
        self.enable_daily = False
        self.enabled = False
        self.headers = dict()
        self.proper_strings = ['PROPER|REPACK|REAL']
        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.supports_movies = False

        self.url = ''
        self.urls = {}

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

        self.ability_status = self.PROVIDER_OK

        shuffle(self.bt_cache_urls)
Exemplo n.º 9
0
 def __init__(self):
     self.session = helpers.make_session()
     self.url = "https://api.pushbullet.com/v2/"
Exemplo n.º 10
0
import requests

from sickchill import logger, settings
from sickchill.oldbeard import helpers

meta_session = helpers.make_session()


def getShowImage(url, imgNum=None):
    if not url:
        return None

    # if they provided a fanart number try to use it instead
    if imgNum is not None:
        temp_url = url.split("-")[0] + "-" + str(imgNum) + ".jpg"
    else:
        temp_url = url

    logger.debug("Fetching image from " + temp_url)

    try:
        image_data = helpers.getURL(temp_url,
                                    session=meta_session,
                                    returns="content",
                                    allow_proxy=settings.PROXY_INDEXERS)
    except requests.exceptions.RequestException:
        image_data = None

    if not image_data:
        logger.warning(
            "There was an error trying to retrieve the image, aborting")
Exemplo n.º 11
0
 def __init__(self):
     self._newest_version = ""
     self.session = helpers.make_session()
     self.branch = "pip"
Exemplo n.º 12
0
 def __init__(self):
     self.session = helpers.make_session()
     self.url = 'https://new.boxcar.io/api/notifications'
Exemplo n.º 13
0
 def __init__(self):
     self.session = make_session()
Exemplo n.º 14
0
 def __init__(self):
     self._newest_version: Union[packaging_version.LegacyVersion,
                                 packaging_version.Version] = None
     self.session = helpers.make_session()
     self.branch = "pip"
Exemplo n.º 15
0
 def __init__(self):
     self.api_url = "https://api.pushover.net/1/messages.json"
     self.session = make_session()
Exemplo n.º 16
0
 def __init__(self):
     """Gets a list of most popular TV series from imdb"""
     self.session = helpers.make_session()
     self.imdb = Imdb(session=self.session)