From 75b1787e73b6267b33e0e6795357bbae28f64a04 Mon Sep 17 00:00:00 2001 From: JackDandy Date: Wed, 4 Apr 2018 21:13:04 +0100 Subject: [PATCH] Remove GFT torrent provider. --- CHANGES.md | 7 +- gui/slick/images/providers/gftracker.png | Bin 886 -> 0 bytes sickbeard/providers/__init__.py | 3 +- sickbeard/providers/gftracker.py | 119 ----------------------- 4 files changed, 7 insertions(+), 122 deletions(-) delete mode 100644 gui/slick/images/providers/gftracker.png delete mode 100644 sickbeard/providers/gftracker.py diff --git a/CHANGES.md b/CHANGES.md index 7c475834..c7d5c372 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,9 @@ -### 0.15.4 (2018-04-03 16:10:00 UTC) +### 0.15.5 (2018-04-04 21:10:00 UTC) + +* Remove GFT torrent provider + + +### 0.15.4 (2018-04-03 16:10:00 UTC) * Fix Torrentleech provider diff --git a/gui/slick/images/providers/gftracker.png b/gui/slick/images/providers/gftracker.png deleted file mode 100644 index a9f2d2ffdc985525e9a97917d5667a41b0317c72..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 886 zcmV-+1Bv{JP)bh=*H*N2GaoesIVOiAal=;G2hk98Y{oU)t0!sd$K^?R_(9+j> zD+k_mMamF>0IdBvKleg^r^*;XSs-Zrx6G7!7Nl=~NBCe|cwDYXnJuLhLSdBpip~7G zg0{i|Ou&s~q?(P@R*ju(8XK zpWhO4hJr$f*|GCqcN{3LjXwLsna0mQD(ZaN1hRVJ^8DBZWK00k9VOwX-hI1q@V#Jt zO(0gAn*M!LLk;tIfRd``JL+HQQCv>KsG!Qy=p_a`{m1;4?!CYLG(p>6>e=`HQ6aey z;_lS+!pNu)7=CgmbGyBfu#`f(cmKxF7jwr?D7v9Qk(x=#KyV2-lZqmQ$Rz&0_35ef z=sC*sHST}=J3(aM$icsF?^C23Kjtq1>*<3%Ew?G_5c6? M07*qoM6N<$f)oI-IsgCw diff --git a/sickbeard/providers/__init__.py b/sickbeard/providers/__init__.py index d5ec1a06..06ca64d6 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, blutopia, btn, btscene, dh, ettv, \ - fano, filelist, funfile, gftracker, grabtheinfo, hdbits, hdspace, hdtorrents, \ + fano, filelist, funfile, grabtheinfo, hdbits, hdspace, hdtorrents, \ iptorrents, limetorrents, magnetdl, morethan, nebulance, ncore, nyaa, pisexy, potuk, pretome, privatehd, ptf, \ rarbg, revtt, scenehd, scenetime, shazbat, showrss, skytorrents, speedcd, \ thepiratebay, torlock, torrentbytes, torrentday, torrenting, torrentleech, \ @@ -55,7 +55,6 @@ __all__ = ['omgwtfnzbs', 'fano', 'filelist', 'funfile', - 'gftracker', 'grabtheinfo', 'hdbits', 'hdspace', diff --git a/sickbeard/providers/gftracker.py b/sickbeard/providers/gftracker.py deleted file mode 100644 index dae9aa19..00000000 --- a/sickbeard/providers/gftracker.py +++ /dev/null @@ -1,119 +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 . - -import re -import time -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 GFTrackerProvider(generic.TorrentProvider): - - def __init__(self): - generic.TorrentProvider.__init__(self, 'GFTracker', cache_update_freq=17) - - self.url_base = 'https://thegft.org/' - self.urls = {'config_provider_home_uri': self.url_base, - 'login_init': self.url_base + 'login.php', - 'login': self.url_base + 'loginsite.php', - 'browse': self.url_base + 'browse.php?view=0&%s&searchtype=1%s', - 'search': '&search=%s'} - - self.categories = {'shows': [4, 17, 19, 26, 37, 47], 'anime': [16]} - - self.url = self.urls['config_provider_home_uri'] - - self.username, self.password, self.scene, self.minseed, self.minleech = 5 * [None] - - def _authorised(self, **kwargs): - - return super(GFTrackerProvider, self)._authorised(logged_in=(lambda y=None: self.has_all_cookies(pre='gft_')), - url=[self.urls['login_init']]) - - 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': 'details', 'get': 'download', - 'seeders': r'(^\d+)', 'leechers': r'(\d+)$'}.items()) - for mode in search_params.keys(): - for search_string in search_params[mode]: - search_string = isinstance(search_string, unicode) and unidecode(search_string) or search_string - search_url = self.urls['browse'] % (self._categories_string(mode), - (self.urls['search'] % search_string, '')['Cache' == mode]) - - html = self.get_url(search_url) - if self.should_skip(): - return results - - cnt = len(items[mode]) - try: - if not html or self._has_no_results(html): - time.sleep(1.1) - raise generic.HaltParseException - - with BS4Parser(html, features=['html5lib', 'permissive']) as soup: - torrent_table = soup.find('div', id='torrentBrowse').find('table') - 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 3 > len(cells): - continue - try: - head = head if None is not head else self._header_row(tr) - seeders, leechers = 2 * [cells[head['seed']].get_text().strip()] - seeders, leechers = [tryInt(n) for n in [ - rc['seeders'].findall(seeders)[0], rc['leechers'].findall(leechers)[0]]] - if self._peers_fail(mode, seeders, leechers): - continue - - info = tr.find('a', href=rc['info']) - title = (info.attrs.get('title') or info.get_text()).strip() - size = cells[head['size']].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, search_url) - - results = self._sort_seeding(mode, results + items[mode]) - - return results - - -provider = GFTrackerProvider()