From 99c3d768ff3964590a6f45718a4fefe18c895b41 Mon Sep 17 00:00:00 2001 From: JackDandy Date: Sat, 20 May 2017 10:33:21 +0100 Subject: [PATCH] Remove provider Freshon.tv --- CHANGES.md | 7 +- gui/slick/images/providers/freshontv.png | Bin 3618 -> 0 bytes sickbeard/providers/__init__.py | 3 +- sickbeard/providers/freshontv.py | 143 ----------------------- 4 files changed, 7 insertions(+), 146 deletions(-) delete mode 100644 gui/slick/images/providers/freshontv.png delete mode 100644 sickbeard/providers/freshontv.py diff --git a/CHANGES.md b/CHANGES.md index f70c031f..34a2358a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,9 @@ -### 0.12.18 (2017-05-15 23:00:00 UTC) +### 0.12.19 (2017-05-20 10:30:00 UTC) + +* Remove provider Freshon.tv + + +### 0.12.18 (2017-05-15 23:00:00 UTC) * Change thexem, remove tvrage from xem diff --git a/gui/slick/images/providers/freshontv.png b/gui/slick/images/providers/freshontv.png deleted file mode 100644 index 089d3479baac284e422f703cafdd3492746d6586..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3618 zcmV+-4&CvIP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!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- z@fFtoT*Yd2^KfmI`=Jo^UN85W0?d|PsY^*am zIYm01rTN%VzPR`mSEjDAwzkgo*?=wq>H7M5=kV|_Gt<)?KGHxU5kpZ_78dT1PNzww zQhbYD_ omt|QW85z+H!_cGAXzH&40PwkUVo*E>tpET307*qoM6N<$f{;tmsQ>@~ diff --git a/sickbeard/providers/__init__.py b/sickbeard/providers/__init__.py index 6e6134cb..226d4c42 100755 --- a/sickbeard/providers/__init__.py +++ b/sickbeard/providers/__init__.py @@ -27,7 +27,7 @@ from sickbeard import logger, encodingKludge as ek from . import newznab, omgwtfnzbs # torrent from . import alpharatio, beyondhd, bithdtv, bitmetv, btn, btscene, dh, \ - fano, filelist, freshontv, funfile, gftracker, grabtheinfo, hd4free, hdbits, hdspace, hdtorrents, \ + fano, filelist, funfile, gftracker, grabtheinfo, hd4free, hdbits, hdspace, hdtorrents, \ iptorrents, limetorrents, morethan, nebulance, ncore, pisexy, pretome, privatehd, ptf, \ rarbg, revtt, scc, scenetime, shazbat, speedcd, \ thepiratebay, torlock, torrentday, torrenting, torrentleech, \ @@ -52,7 +52,6 @@ __all__ = ['omgwtfnzbs', 'dh', 'fano', 'filelist', - 'freshontv', 'funfile', 'gftracker', 'grabtheinfo', diff --git a/sickbeard/providers/freshontv.py b/sickbeard/providers/freshontv.py deleted file mode 100644 index 7335dc09..00000000 --- a/sickbeard/providers/freshontv.py +++ /dev/null @@ -1,143 +0,0 @@ -# coding=utf-8 -# -# This file is part of SickGear. -# -# SickGear 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. -# -# SickGear 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 SickGear. If not, see . - -try: - from collections import OrderedDict -except ImportError: - from requests.compat import OrderedDict -import re -import traceback - -from . import generic -from sickbeard import logger -from sickbeard.bs4_parser import BS4Parser -from sickbeard.helpers import tryInt -from lib.unidecode import unidecode - - -class FreshOnTVProvider(generic.TorrentProvider): - - def __init__(self): - generic.TorrentProvider.__init__(self, 'FreshOnTV', cache_update_freq=20) - - self.url_base = 'https://freshon.tv/' - self.urls = {'config_provider_home_uri': self.url_base, - 'login_action': self.url_base + 'login.php', - 'search': self.url_base + 'browse.php?incldead=0&words=0&%s&search=%s', - 'get': self.url_base + '%s'} - - self.categories = {'shows': 0, 'anime': 235} - - self.url = self.urls['config_provider_home_uri'] - - self.filter = [] - self.may_filter = OrderedDict([ - ('f0', ('not marked', False, '')), ('f50', ('50%', True)), ('f100', ('100%', True))]) - self.username, self.password, self.minseed, self.minleech = 4 * [None] - - def _authorised(self, **kwargs): - - return super(FreshOnTVProvider, self)._authorised( - post_params={'form_tmpl': True}, - failed_msg=(lambda y=None: 'DDoS protection by CloudFlare' in y and - u'Unable to login to %s due to CloudFlare DDoS javascript check' or - 'Username does not exist' in y and - u'Invalid username or password for %s. Check settings' or - u'Failed to authenticate or parse a response from %s, abort provider')) - - def _search_provider(self, search_params, **kwargs): - - results = [] - if not self._authorised(): - return results - - items = {'Cache': [], 'Season': [], 'Episode': [], 'Propers': []} - - rc = dict((k, re.compile('(?i)' + v)) - for (k, v) in {'info': 'detail', 'get': 'download', 'name': '_name'}.items()) - log = '' - if self.filter: - non_marked = 'f0' in self.filter - # if search_any, use unselected to exclude, else use selected to keep - filters = ([f for f in self.may_filter if f in self.filter], - [f for f in self.may_filter if f not in self.filter])[non_marked] - rc['filter'] = re.compile('(?i)(%s).png' % '|'.join( - [f.replace('f', '') for f in filters if self.may_filter[f][1]])) - log = '%sing (%s) ' % (('keep', 'skipp')[non_marked], ', '.join([self.may_filter[f][0] for f in filters])) - for mode in search_params.keys(): - for search_string in search_params[mode]: - - search_string, void = self._title_and_url(( - isinstance(search_string, unicode) and unidecode(search_string) or search_string, '')) - void, search_url = self._title_and_url(( - '', self.urls['search'] % (self._categories_string(mode, 'cat=%s'), search_string))) - - # returns top 15 results by default, expandable in user profile to 100 - html = self.get_url(search_url) - - cnt = len(items[mode]) - try: - if not html or self._has_no_results(html): - raise generic.HaltParseException - - with BS4Parser(html, features=['html5lib', 'permissive']) as soup: - torrent_table = soup.find('table', class_='frame') - torrent_rows = [] if not torrent_table else torrent_table.find_all('tr') - - if 2 > len(torrent_rows): - raise generic.HaltParseException - - head = None - for tr in torrent_rows[1:]: - cells = tr.find_all('td') - if (5 > len(cells) or tr.find('img', alt='Nuked') - or (any(self.filter) - and ((non_marked and tr.find('img', src=rc['filter'])) - or (not non_marked and not tr.find('img', src=rc['filter']))))): - continue - try: - head = head if None is not head else self._header_row(tr) - seeders, leechers, size = [tryInt(n, n) for n in [ - cells[head[x]].get_text().strip() for x in 'seed', 'leech', 'size']] - if self._peers_fail(mode, seeders, leechers): - continue - - info = tr.find('a', href=rc['info'], class_=rc['name']) - title = (info.attrs.get('title') or info.get_text()).strip() - download_url = self._link(tr.find('a', href=rc['get'])['href']) - except (AttributeError, TypeError, ValueError): - continue - - if title and download_url: - items[mode].append((title, download_url, seeders, self._bytesizer(size))) - - except generic.HaltParseException: - pass - except (StandardError, Exception): - logger.log(u'Failed to parse. Traceback: %s' % traceback.format_exc(), logger.ERROR) - self._log_search(mode, len(items[mode]) - cnt, log + search_url) - - results = self._sort_seeding(mode, results + items[mode]) - - return results - - def _episode_strings(self, ep_obj, **kwargs): - - return generic.TorrentProvider._episode_strings(self, ep_obj, sep_date='|', **kwargs) - - -provider = FreshOnTVProvider()