From 5b7cefb28552ae438d55011d2850bb1f1cce8bdf Mon Sep 17 00:00:00 2001 From: Mark Stein Date: Thu, 2 May 2019 00:53:13 -0400 Subject: [PATCH 01/35] Create gimmepeers.py --- medusa/providers/torrent/html/gimmepeers.py | 162 ++++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100644 medusa/providers/torrent/html/gimmepeers.py diff --git a/medusa/providers/torrent/html/gimmepeers.py b/medusa/providers/torrent/html/gimmepeers.py new file mode 100644 index 0000000000..1aa0983cd5 --- /dev/null +++ b/medusa/providers/torrent/html/gimmepeers.py @@ -0,0 +1,162 @@ +# coding=utf-8 + +"""Provider code for GimmePeers.""" + +from __future__ import unicode_literals + +import re +import traceback + +from requests.utils import dict_from_cookiejar + +from medusa import tv +from medusa import logger +from medusa.bs4_parser import BS4Parser +from medusa.helper.common import convert_size, try_int +from medusa.providers.torrent.torrent_provider import TorrentProvider + + + +class GimmePeersProvider(TorrentProvider): # pylint: disable=too-many-instance-attributes + + def __init__(self): + + TorrentProvider.__init__(self, "GimmePeers") + + self.urls = { + 'base_url': 'https://www.gimmepeers.com', + 'login': 'https://www.gimmepeers.com/takelogin.php', + 'detail': 'https://www.gimmepeers.com/details.php?id=%s', + 'search': 'https://www.gimmepeers.com/browse.php', + 'download': 'https://gimmepeers.com/%s', + } + + self.url = self.urls['base_url'] + + self.username = None + self.password = None + self.minseed = None + self.minleech = None + + self.cache = tv.Cache(self) + + self.search_params = { + #c20=1&c21=1&c25=1&c24=1&c23=1&c22=1&c1=1 + "c20": 1, "c21": 1, "c25": 1, "c24": 1, "c23": 1, "c22": 1, "c1": 1 + } + + def _check_auth(self): + if not self.username or not self.password: + logger.log(u"Invalid username or password. Check your settings", logger.WARNING) + + return True + + def login(self): + if any(dict_from_cookiejar(self.session.cookies).values()): + return True + + login_params = { + 'username': self.username, + 'password': self.password, + 'ssl': 'yes' + } + + response = self.session.post(self.urls['login'], data=login_params) + if not response or not response.text: + logger.log(u"Unable to connect to provider", logger.WARNING) + return False + + if re.search('Username or password incorrect!', response.text): + logger.log(u"Invalid username or password. Check your settings", logger.WARNING) + return False + + return True + + def search(self, search_strings, age=0, ep_obj=None, **kwargs): # pylint: disable=too-many-locals + results = [] + if not self.login(): + return results + + for mode in search_strings: + + logger.log(u"Search Mode: {0}".format(mode), logger.DEBUG) + for search_string in search_strings[mode]: + if mode != 'RSS': + logger.log(u"Search string: {0}".format + (search_string.decode("utf-8")), logger.DEBUG) + + self.search_params['search'] = search_string + + data = self.session.get(self.urls['search'], params=self.search_params) + if not data: + continue + + results += self.parse(data.text, mode) + + return results + + # Checks if cookie has timed-out causing search to redirect to login page. + # If text matches on loginpage we login and generate a new cookie and load the search data again. + # if re.search('Still need help logging in?', response.text): + # logger.log(u"Login has timed out. Need to generate new cookie for GimmePeers and search again.", logger.DEBUG) + # self.session.cookies.clear() + # self.login() + # + # data = self.session.get(self.urls['search'], params=self.search_params) + # if not data: + # continue + + def parse(self, data, mode): + items = [] + + with BS4Parser(data, 'html5lib') as html: + torrent_table = html.find('table', class_='browsetable') + torrent_rows = torrent_table('tr') if torrent_table else [] + + # Continue only if one Release is found + if len(torrent_rows) < 2: + logger.log(u"Data returned from provider does not contain any torrents", logger.DEBUG) + return items + + for result in torrent_rows[1:]: + try: + cells = result('td') + + link = cells[1].find('a') + download_url = self.urls['download'] % cells[2].find('a')['href'] + + + title = link.getText() + seeders = int(cells[10].getText().replace(',', '')) + leechers = int(cells[11].getText().replace(',', '')) + torrent_size = cells[8].getText() + size = convert_size(torrent_size) or -1 + # except (AttributeError, TypeError): + # continue + + if not all([title, download_url]): + continue + + # Filter unseeded torrent + if seeders < self.minseed or leechers < self.minleech: + if mode != 'RSS': + logger.log(u"Discarding torrent because it doesn't meet the minimum seeders or leechers: {0} (S:{1} L:{2})".format + (title, seeders, leechers), logger.DEBUG) + continue + + if seeders >= 32768 or leechers >= 32768: + continue + + item = {'title': title, 'link': download_url, 'size': size, 'seeders': seeders, 'leechers': leechers, 'hash': ''} + if mode != 'RSS': + logger.log(u"Found result: {0} with {1} seeders and {2} leechers".format(title, seeders, leechers), logger.DEBUG) + + items.append(item) + + except (AttributeError, TypeError, KeyError, ValueError, IndexError): + logger.exception('Failed parsing provider.') + + return items + + +provider = GimmePeersProvider() From d6fdbfb94bcff41c694b1f11891d3741c4980ec2 Mon Sep 17 00:00:00 2001 From: Mark Stein Date: Thu, 2 May 2019 00:59:24 -0400 Subject: [PATCH 02/35] Update __init__.py --- medusa/providers/torrent/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/medusa/providers/torrent/__init__.py b/medusa/providers/torrent/__init__.py index 0a61823b32..42697ef398 100644 --- a/medusa/providers/torrent/__init__.py +++ b/medusa/providers/torrent/__init__.py @@ -14,6 +14,7 @@ bjshare, cinemaz, elitetracker, + gimmepeers, hdspace, hdtorrents, hebits, @@ -69,5 +70,5 @@ 'torrentbytes', 'torrentleech', 'nebulance', 'tvchaosuk', 'xthor', 'zooqle', 'bitcannon', 'btn', 'hdbits', 'norbits', 'rarbg', 'torrentday', 'nyaa', 'rsstorrent', 'shazbat', 'hebits', 'torrentz2', 'animetorrents', 'anidex', 'shanaproject', 'torrenting', 'yggtorrent', - 'elitetracker', 'privatehd', 'cinemaz', 'avistaz', 'bjshare', 'ncore' + 'elitetracker', 'privatehd', 'cinemaz', 'avistaz', 'bjshare', 'ncore', 'gimmepeers' ] From 96aea44b0b262013016d51efebc4f72859663dbb Mon Sep 17 00:00:00 2001 From: Mark Stein Date: Thu, 2 May 2019 01:00:05 -0400 Subject: [PATCH 03/35] Update __init__.py --- medusa/providers/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/medusa/providers/__init__.py b/medusa/providers/__init__.py index 31f15ea09e..033a5ba604 100644 --- a/medusa/providers/__init__.py +++ b/medusa/providers/__init__.py @@ -28,6 +28,7 @@ cinemaz, danishbits, elitetracker, + gimmepeers, hdbits, hdspace, hdtorrents, @@ -69,7 +70,7 @@ 'abnormal', 'scenetime', 'nebulance', 'tvchaosuk', 'bitcannon', 'torrentz2', 'pretome', 'anizb', 'hdspace', 'nordicbits', 'danishbits', 'limetorrents', 'norbits', 'bithdtv', 'ncore', 'zooqle', 'animebytes', 'animetorrents', 'anidex', 'shanaproject', 'torrenting', - 'yggtorrent', 'elitetracker', 'archetorrent', 'privatehd', 'cinemaz', 'avistaz', 'bjshare' + 'yggtorrent', 'elitetracker', 'archetorrent', 'privatehd', 'cinemaz', 'avistaz', 'bjshare', 'gimmepeers' ] From 9a9bbbeb45230178f181a36421c96952cefae966 Mon Sep 17 00:00:00 2001 From: Mark Stein Date: Thu, 2 May 2019 01:01:57 -0400 Subject: [PATCH 04/35] Add files via upload --- themes/dark/assets/img/providers/gimmepeers.png | Bin 0 -> 3126 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 themes/dark/assets/img/providers/gimmepeers.png diff --git a/themes/dark/assets/img/providers/gimmepeers.png b/themes/dark/assets/img/providers/gimmepeers.png new file mode 100644 index 0000000000000000000000000000000000000000..e086e38c4e1eac7455fdd28b0c97fb597a90bcad GIT binary patch literal 3126 zcmV-649W9}P)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!4 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lc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0004DNkl;x1w(#i70_xbKWpAb?ZJcV6*x#d3DL-@JL9>R|hGO|A5)d8v+ z>;imu9~t`>KsExp7^?@@%+11&?CJv4XvSu@CrL9lyFF?&LrCLK(#-LHx*C|^`DzQm ze6>Zr&6uyYoG({|R7{s^4#yLE^2KJi2Oxa?up+iQLjd$-L8(dE5d%oltgIhkx?Ed; zo-6gy#YjL4OQj%P0<aw>is>c QTmS$707*qoM6N<$g6-YUYXATM literal 0 HcmV?d00001 From f27a8746ac3de1514a2a4e2f0d75117730ee1e6b Mon Sep 17 00:00:00 2001 From: Mark Stein Date: Thu, 2 May 2019 01:03:08 -0400 Subject: [PATCH 05/35] Add files via upload --- themes/light/assets/img/providers/gimmepeers.png | Bin 0 -> 3126 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 themes/light/assets/img/providers/gimmepeers.png diff --git a/themes/light/assets/img/providers/gimmepeers.png b/themes/light/assets/img/providers/gimmepeers.png new file mode 100644 index 0000000000000000000000000000000000000000..e086e38c4e1eac7455fdd28b0c97fb597a90bcad GIT binary patch literal 3126 zcmV-649W9}P)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!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^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dcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0004DNkl;x1w(#i70_xbKWpAb?ZJcV6*x#d3DL-@JL9>R|hGO|A5)d8v+ z>;imu9~t`>KsExp7^?@@%+11&?CJv4XvSu@CrL9lyFF?&LrCLK(#-LHx*C|^`DzQm ze6>Zr&6uyYoG({|R7{s^4#yLE^2KJi2Oxa?up+iQLjd$-L8(dE5d%oltgIhkx?Ed; zo-6gy#YjL4OQj%P0<aw>is>c QTmS$707*qoM6N<$g6-YUYXATM literal 0 HcmV?d00001 From 4f7037a6760582ed875d7913dd056057a0bf9b3c Mon Sep 17 00:00:00 2001 From: Mark Stein Date: Thu, 2 May 2019 01:04:51 -0400 Subject: [PATCH 06/35] Update gimmepeers.py --- medusa/providers/torrent/html/gimmepeers.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/medusa/providers/torrent/html/gimmepeers.py b/medusa/providers/torrent/html/gimmepeers.py index 1aa0983cd5..5caf6b2c8e 100644 --- a/medusa/providers/torrent/html/gimmepeers.py +++ b/medusa/providers/torrent/html/gimmepeers.py @@ -95,17 +95,6 @@ def search(self, search_strings, age=0, ep_obj=None, **kwargs): # pylint: disab return results - # Checks if cookie has timed-out causing search to redirect to login page. - # If text matches on loginpage we login and generate a new cookie and load the search data again. - # if re.search('Still need help logging in?', response.text): - # logger.log(u"Login has timed out. Need to generate new cookie for GimmePeers and search again.", logger.DEBUG) - # self.session.cookies.clear() - # self.login() - # - # data = self.session.get(self.urls['search'], params=self.search_params) - # if not data: - # continue - def parse(self, data, mode): items = [] From 6f600d2f3a565e76dac61cba4d6761a572384c7a Mon Sep 17 00:00:00 2001 From: Mark Date: Thu, 2 May 2019 01:31:01 -0400 Subject: [PATCH 07/35] run isort --- medusa/providers/__init__.py | 70 +++++------------- medusa/providers/torrent/__init__.py | 78 +++++---------------- medusa/providers/torrent/html/gimmepeers.py | 4 +- 3 files changed, 36 insertions(+), 116 deletions(-) diff --git a/medusa/providers/__init__.py b/medusa/providers/__init__.py index 033a5ba604..4fcdabf2df 100644 --- a/medusa/providers/__init__.py +++ b/medusa/providers/__init__.py @@ -4,64 +4,26 @@ from __future__ import unicode_literals import pkgutil -from builtins import next -from builtins import zip +from builtins import next, zip from os import sys from random import shuffle from medusa import app -from medusa.providers.nzb import ( - anizb, binsearch, -) -from medusa.providers.torrent import ( - abnormal, - alpharatio, - anidex, - animebytes, - animetorrents, - archetorrent, - avistaz, - bitcannon, - bithdtv, - bjshare, - btn, - cinemaz, - danishbits, - elitetracker, - gimmepeers, - hdbits, - hdspace, - hdtorrents, - hebits, - iptorrents, - limetorrents, - morethantv, - ncore, - nebulance, - norbits, - nordicbits, - nyaa, - pretome, - privatehd, - rarbg, - scenetime, - sdbits, - shanaproject, - shazbat, - speedcd, - thepiratebay, - tntvillage, - tokyotoshokan, - torrentbytes, - torrentday, - torrenting, - torrentleech, - torrentz2, - tvchaosuk, - xthor, - yggtorrent, - zooqle -) +from medusa.providers.nzb import anizb, binsearch +from medusa.providers.torrent import (abnormal, alpharatio, anidex, animebytes, + animetorrents, archetorrent, avistaz, + bitcannon, bithdtv, bjshare, btn, + cinemaz, danishbits, elitetracker, + gimmepeers, hdbits, hdspace, hdtorrents, + hebits, iptorrents, limetorrents, + morethantv, ncore, nebulance, norbits, + nordicbits, nyaa, pretome, privatehd, + rarbg, scenetime, sdbits, shanaproject, + shazbat, speedcd, thepiratebay, + tntvillage, tokyotoshokan, torrentbytes, + torrentday, torrenting, torrentleech, + torrentz2, tvchaosuk, xthor, yggtorrent, + zooqle) __all__ = [ 'btn', 'thepiratebay', 'torrentleech', 'hdtorrents', 'torrentday', 'hdbits', diff --git a/medusa/providers/torrent/__init__.py b/medusa/providers/torrent/__init__.py index 42697ef398..77d1a1cc55 100644 --- a/medusa/providers/torrent/__init__.py +++ b/medusa/providers/torrent/__init__.py @@ -3,65 +3,25 @@ """Initialize all torrent providers.""" from __future__ import unicode_literals -from medusa.providers.torrent.html import ( - abnormal, - alpharatio, - anidex, - animetorrents, - archetorrent, - avistaz, - bithdtv, - bjshare, - cinemaz, - elitetracker, - gimmepeers, - hdspace, - hdtorrents, - hebits, - iptorrents, - limetorrents, - morethantv, - nebulance, - nordicbits, - pretome, - privatehd, - scenetime, - sdbits, - shanaproject, - speedcd, - thepiratebay, - tntvillage, - tokyotoshokan, - torrentbytes, - torrenting, - tvchaosuk, - yggtorrent, - zooqle, -) -from medusa.providers.torrent.json import ( - animebytes, - bitcannon, - btn, - danishbits, - hdbits, - ncore, - norbits, - rarbg, - torrentday, - torrentleech, - xthor, -) -from medusa.providers.torrent.rss import ( - nyaa, - rsstorrent, - shazbat, -) -from medusa.providers.torrent.torznab import ( - torznab, -) -from medusa.providers.torrent.xml import ( - torrentz2, -) +from medusa.providers.torrent.html import (abnormal, alpharatio, anidex, + animetorrents, archetorrent, + avistaz, bithdtv, bjshare, cinemaz, + elitetracker, gimmepeers, hdspace, + hdtorrents, hebits, iptorrents, + limetorrents, morethantv, nebulance, + nordicbits, pretome, privatehd, + scenetime, sdbits, shanaproject, + speedcd, thepiratebay, tntvillage, + tokyotoshokan, torrentbytes, + torrenting, tvchaosuk, yggtorrent, + zooqle) +from medusa.providers.torrent.json import (animebytes, bitcannon, btn, + danishbits, hdbits, ncore, norbits, + rarbg, torrentday, torrentleech, + xthor) +from medusa.providers.torrent.rss import nyaa, rsstorrent, shazbat +from medusa.providers.torrent.torznab import torznab +from medusa.providers.torrent.xml import torrentz2 __all__ = [ 'abnormal', 'alpharatio', 'animebytes', 'archetorrent', 'bithdtv', 'danishbits', diff --git a/medusa/providers/torrent/html/gimmepeers.py b/medusa/providers/torrent/html/gimmepeers.py index 5caf6b2c8e..dc7c16de59 100644 --- a/medusa/providers/torrent/html/gimmepeers.py +++ b/medusa/providers/torrent/html/gimmepeers.py @@ -9,14 +9,12 @@ from requests.utils import dict_from_cookiejar -from medusa import tv -from medusa import logger +from medusa import logger, tv from medusa.bs4_parser import BS4Parser from medusa.helper.common import convert_size, try_int from medusa.providers.torrent.torrent_provider import TorrentProvider - class GimmePeersProvider(TorrentProvider): # pylint: disable=too-many-instance-attributes def __init__(self): From 379d1794a0059b8129f2f35aedee043cdf91c8a5 Mon Sep 17 00:00:00 2001 From: Mark Stein Date: Thu, 2 May 2019 01:36:58 -0400 Subject: [PATCH 08/35] Update gimmepeers.py --- medusa/providers/torrent/html/gimmepeers.py | 1 - 1 file changed, 1 deletion(-) diff --git a/medusa/providers/torrent/html/gimmepeers.py b/medusa/providers/torrent/html/gimmepeers.py index dc7c16de59..d149806734 100644 --- a/medusa/providers/torrent/html/gimmepeers.py +++ b/medusa/providers/torrent/html/gimmepeers.py @@ -5,7 +5,6 @@ from __future__ import unicode_literals import re -import traceback from requests.utils import dict_from_cookiejar From 29438124a516c41a0d7e724ca4aabee84fca1e09 Mon Sep 17 00:00:00 2001 From: Mark Stein Date: Thu, 2 May 2019 01:37:44 -0400 Subject: [PATCH 09/35] Update gimmepeers.py --- medusa/providers/torrent/html/gimmepeers.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/medusa/providers/torrent/html/gimmepeers.py b/medusa/providers/torrent/html/gimmepeers.py index d149806734..3088faa07a 100644 --- a/medusa/providers/torrent/html/gimmepeers.py +++ b/medusa/providers/torrent/html/gimmepeers.py @@ -6,8 +6,6 @@ import re -from requests.utils import dict_from_cookiejar - from medusa import logger, tv from medusa.bs4_parser import BS4Parser from medusa.helper.common import convert_size, try_int From 9b1f1cf6f88506bd542131210ff52c34353cb5f0 Mon Sep 17 00:00:00 2001 From: Mark Date: Thu, 2 May 2019 01:44:23 -0400 Subject: [PATCH 10/35] make pep8 compliant for flake8 check --- medusa/providers/torrent/html/gimmepeers.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/medusa/providers/torrent/html/gimmepeers.py b/medusa/providers/torrent/html/gimmepeers.py index dc7c16de59..aa90ff8031 100644 --- a/medusa/providers/torrent/html/gimmepeers.py +++ b/medusa/providers/torrent/html/gimmepeers.py @@ -1,6 +1,6 @@ # coding=utf-8 -"""Provider code for GimmePeers.""" +"""Provider code for GimmePeers.""" from __future__ import unicode_literals @@ -39,7 +39,7 @@ def __init__(self): self.cache = tv.Cache(self) self.search_params = { - #c20=1&c21=1&c25=1&c24=1&c23=1&c22=1&c1=1 + # c20=1&c21=1&c25=1&c24=1&c23=1&c22=1&c1=1 "c20": 1, "c21": 1, "c25": 1, "c24": 1, "c23": 1, "c22": 1, "c1": 1 } @@ -76,7 +76,7 @@ def search(self, search_strings, age=0, ep_obj=None, **kwargs): # pylint: disab return results for mode in search_strings: - + logger.log(u"Search Mode: {0}".format(mode), logger.DEBUG) for search_string in search_strings[mode]: if mode != 'RSS': @@ -112,7 +112,6 @@ def parse(self, data, mode): link = cells[1].find('a') download_url = self.urls['download'] % cells[2].find('a')['href'] - title = link.getText() seeders = int(cells[10].getText().replace(',', '')) leechers = int(cells[11].getText().replace(',', '')) @@ -142,7 +141,7 @@ def parse(self, data, mode): except (AttributeError, TypeError, KeyError, ValueError, IndexError): logger.exception('Failed parsing provider.') - + return items From 54c1ffa5d0613c16c54caaf44a1c280a6b0cb986 Mon Sep 17 00:00:00 2001 From: Mark Stein Date: Thu, 2 May 2019 01:57:50 -0400 Subject: [PATCH 11/35] Update gimmepeers.py --- medusa/providers/torrent/html/gimmepeers.py | 31 +++++++++++++++------ 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/medusa/providers/torrent/html/gimmepeers.py b/medusa/providers/torrent/html/gimmepeers.py index 4a6405a37b..e4cd46e8a1 100644 --- a/medusa/providers/torrent/html/gimmepeers.py +++ b/medusa/providers/torrent/html/gimmepeers.py @@ -8,15 +8,16 @@ from medusa import logger, tv from medusa.bs4_parser import BS4Parser -from medusa.helper.common import convert_size, try_int +from medusa.helper.common import convert_size from medusa.providers.torrent.torrent_provider import TorrentProvider -class GimmePeersProvider(TorrentProvider): # pylint: disable=too-many-instance-attributes - +class GimmePeersProvider(TorrentProvider): + """GimmePeers Torrent provider.""" + def __init__(self): - TorrentProvider.__init__(self, "GimmePeers") + TorrentProvider.__init__(self, 'GimmePeers') self.urls = { 'base_url': 'https://www.gimmepeers.com', @@ -37,16 +38,17 @@ def __init__(self): self.search_params = { # c20=1&c21=1&c25=1&c24=1&c23=1&c22=1&c1=1 - "c20": 1, "c21": 1, "c25": 1, "c24": 1, "c23": 1, "c22": 1, "c1": 1 + 'c20': 1, 'c21': 1, 'c25': 1, 'c24': 1, 'c23': 1, 'c22': 1, 'c1': 1 } def _check_auth(self): if not self.username or not self.password: - logger.log(u"Invalid username or password. Check your settings", logger.WARNING) + logger.log(u'Invalid username or password. Check your settings', logger.WARNING) return True def login(self): + """Login method used for logging in before doing search and torrent downloads.""" if any(dict_from_cookiejar(self.session.cookies).values()): return True @@ -58,16 +60,23 @@ def login(self): response = self.session.post(self.urls['login'], data=login_params) if not response or not response.text: - logger.log(u"Unable to connect to provider", logger.WARNING) + logger.log(u'Unable to connect to provider', logger.WARNING) return False if re.search('Username or password incorrect!', response.text): - logger.log(u"Invalid username or password. Check your settings", logger.WARNING) + logger.log(u'Invalid username or password. Check your settings', logger.WARNING) return False return True def search(self, search_strings, age=0, ep_obj=None, **kwargs): # pylint: disable=too-many-locals + """ + Search a provider and parse the results. + :param search_strings: A dict with mode (key) and the search value (value) + :param age: Not used + :param ep_obj: Not used + :returns: A list of search results (structure) + """ results = [] if not self.login(): return results @@ -91,6 +100,12 @@ def search(self, search_strings, age=0, ep_obj=None, **kwargs): # pylint: disab return results def parse(self, data, mode): + """ + Parse search results for items. + :param data: The raw response from a search + :param mode: The current mode used to search, e.g. RSS + :return: A list of items found + """ items = [] with BS4Parser(data, 'html5lib') as html: From 1987145b5043bbcfd027ed5473a786e95179cc10 Mon Sep 17 00:00:00 2001 From: Mark Stein Date: Thu, 2 May 2019 02:07:06 -0400 Subject: [PATCH 12/35] pep8 fixes --- medusa/providers/torrent/html/gimmepeers.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/medusa/providers/torrent/html/gimmepeers.py b/medusa/providers/torrent/html/gimmepeers.py index e4cd46e8a1..aa528035f9 100644 --- a/medusa/providers/torrent/html/gimmepeers.py +++ b/medusa/providers/torrent/html/gimmepeers.py @@ -14,7 +14,6 @@ class GimmePeersProvider(TorrentProvider): """GimmePeers Torrent provider.""" - def __init__(self): TorrentProvider.__init__(self, 'GimmePeers') @@ -72,6 +71,7 @@ def login(self): def search(self, search_strings, age=0, ep_obj=None, **kwargs): # pylint: disable=too-many-locals """ Search a provider and parse the results. + :param search_strings: A dict with mode (key) and the search value (value) :param age: Not used :param ep_obj: Not used @@ -83,11 +83,11 @@ def search(self, search_strings, age=0, ep_obj=None, **kwargs): # pylint: disab for mode in search_strings: - logger.log(u"Search Mode: {0}".format(mode), logger.DEBUG) + logger.log(u'Search Mode: {0}'.format(mode), logger.DEBUG) for search_string in search_strings[mode]: if mode != 'RSS': - logger.log(u"Search string: {0}".format - (search_string.decode("utf-8")), logger.DEBUG) + logger.log(u'Search string: {0}'.format + (search_string.decode('utf-8')), logger.DEBUG) self.search_params['search'] = search_string @@ -102,6 +102,7 @@ def search(self, search_strings, age=0, ep_obj=None, **kwargs): # pylint: disab def parse(self, data, mode): """ Parse search results for items. + :param data: The raw response from a search :param mode: The current mode used to search, e.g. RSS :return: A list of items found @@ -114,7 +115,7 @@ def parse(self, data, mode): # Continue only if one Release is found if len(torrent_rows) < 2: - logger.log(u"Data returned from provider does not contain any torrents", logger.DEBUG) + logger.log(u'Data returned from provider does not contain any torrents', logger.DEBUG) return items for result in torrent_rows[1:]: @@ -147,7 +148,7 @@ def parse(self, data, mode): item = {'title': title, 'link': download_url, 'size': size, 'seeders': seeders, 'leechers': leechers, 'hash': ''} if mode != 'RSS': - logger.log(u"Found result: {0} with {1} seeders and {2} leechers".format(title, seeders, leechers), logger.DEBUG) + logger.log(u'Found result: {0} with {1} seeders and {2} leechers'.format(title, seeders, leechers), logger.DEBUG) items.append(item) From 20074636664f3b46efd9811462f761346c515077 Mon Sep 17 00:00:00 2001 From: Mark Stein Date: Thu, 2 May 2019 02:08:31 -0400 Subject: [PATCH 13/35] Update gimmepeers.py --- medusa/providers/torrent/html/gimmepeers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/medusa/providers/torrent/html/gimmepeers.py b/medusa/providers/torrent/html/gimmepeers.py index aa528035f9..75fcdda574 100644 --- a/medusa/providers/torrent/html/gimmepeers.py +++ b/medusa/providers/torrent/html/gimmepeers.py @@ -6,6 +6,8 @@ import re +from requests.utils import dict_from_cookiejar + from medusa import logger, tv from medusa.bs4_parser import BS4Parser from medusa.helper.common import convert_size From 0d3da301354e456843ddaa6ff0918de4b282683c Mon Sep 17 00:00:00 2001 From: Mark Date: Thu, 2 May 2019 02:16:28 -0400 Subject: [PATCH 14/35] pep8 fixes --- medusa/providers/torrent/html/gimmepeers.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/medusa/providers/torrent/html/gimmepeers.py b/medusa/providers/torrent/html/gimmepeers.py index 75fcdda574..fb59375b4e 100644 --- a/medusa/providers/torrent/html/gimmepeers.py +++ b/medusa/providers/torrent/html/gimmepeers.py @@ -16,6 +16,7 @@ class GimmePeersProvider(TorrentProvider): """GimmePeers Torrent provider.""" + def __init__(self): TorrentProvider.__init__(self, 'GimmePeers') @@ -73,7 +74,7 @@ def login(self): def search(self, search_strings, age=0, ep_obj=None, **kwargs): # pylint: disable=too-many-locals """ Search a provider and parse the results. - + :param search_strings: A dict with mode (key) and the search value (value) :param age: Not used :param ep_obj: Not used @@ -104,7 +105,7 @@ def search(self, search_strings, age=0, ep_obj=None, **kwargs): # pylint: disab def parse(self, data, mode): """ Parse search results for items. - + :param data: The raw response from a search :param mode: The current mode used to search, e.g. RSS :return: A list of items found From 35af44510b0b34fef41119392125fd36bc5db4fd Mon Sep 17 00:00:00 2001 From: Mark Stein Date: Thu, 2 May 2019 02:18:50 -0400 Subject: [PATCH 15/35] pep8 fix import order --- medusa/providers/torrent/html/gimmepeers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/medusa/providers/torrent/html/gimmepeers.py b/medusa/providers/torrent/html/gimmepeers.py index fb59375b4e..441501fc23 100644 --- a/medusa/providers/torrent/html/gimmepeers.py +++ b/medusa/providers/torrent/html/gimmepeers.py @@ -6,13 +6,13 @@ import re -from requests.utils import dict_from_cookiejar - from medusa import logger, tv from medusa.bs4_parser import BS4Parser from medusa.helper.common import convert_size from medusa.providers.torrent.torrent_provider import TorrentProvider +from requests.utils import dict_from_cookiejar + class GimmePeersProvider(TorrentProvider): """GimmePeers Torrent provider.""" From 716b056e2dbc777c26fbb75564416e3d07b196c3 Mon Sep 17 00:00:00 2001 From: Mark Stein Date: Thu, 2 May 2019 02:26:08 -0400 Subject: [PATCH 16/35] revert isort --- medusa/providers/__init__.py | 70 +++++++++++++++++++++++++++--------- 1 file changed, 54 insertions(+), 16 deletions(-) diff --git a/medusa/providers/__init__.py b/medusa/providers/__init__.py index 4fcdabf2df..033a5ba604 100644 --- a/medusa/providers/__init__.py +++ b/medusa/providers/__init__.py @@ -4,26 +4,64 @@ from __future__ import unicode_literals import pkgutil -from builtins import next, zip +from builtins import next +from builtins import zip from os import sys from random import shuffle from medusa import app -from medusa.providers.nzb import anizb, binsearch -from medusa.providers.torrent import (abnormal, alpharatio, anidex, animebytes, - animetorrents, archetorrent, avistaz, - bitcannon, bithdtv, bjshare, btn, - cinemaz, danishbits, elitetracker, - gimmepeers, hdbits, hdspace, hdtorrents, - hebits, iptorrents, limetorrents, - morethantv, ncore, nebulance, norbits, - nordicbits, nyaa, pretome, privatehd, - rarbg, scenetime, sdbits, shanaproject, - shazbat, speedcd, thepiratebay, - tntvillage, tokyotoshokan, torrentbytes, - torrentday, torrenting, torrentleech, - torrentz2, tvchaosuk, xthor, yggtorrent, - zooqle) +from medusa.providers.nzb import ( + anizb, binsearch, +) +from medusa.providers.torrent import ( + abnormal, + alpharatio, + anidex, + animebytes, + animetorrents, + archetorrent, + avistaz, + bitcannon, + bithdtv, + bjshare, + btn, + cinemaz, + danishbits, + elitetracker, + gimmepeers, + hdbits, + hdspace, + hdtorrents, + hebits, + iptorrents, + limetorrents, + morethantv, + ncore, + nebulance, + norbits, + nordicbits, + nyaa, + pretome, + privatehd, + rarbg, + scenetime, + sdbits, + shanaproject, + shazbat, + speedcd, + thepiratebay, + tntvillage, + tokyotoshokan, + torrentbytes, + torrentday, + torrenting, + torrentleech, + torrentz2, + tvchaosuk, + xthor, + yggtorrent, + zooqle +) __all__ = [ 'btn', 'thepiratebay', 'torrentleech', 'hdtorrents', 'torrentday', 'hdbits', From f39dbebbce1cb2327f08b89323aa91f579d5b6e8 Mon Sep 17 00:00:00 2001 From: Mark Stein Date: Thu, 2 May 2019 02:26:53 -0400 Subject: [PATCH 17/35] revert isort --- medusa/providers/torrent/__init__.py | 78 +++++++++++++++++++++------- 1 file changed, 59 insertions(+), 19 deletions(-) diff --git a/medusa/providers/torrent/__init__.py b/medusa/providers/torrent/__init__.py index 77d1a1cc55..42697ef398 100644 --- a/medusa/providers/torrent/__init__.py +++ b/medusa/providers/torrent/__init__.py @@ -3,25 +3,65 @@ """Initialize all torrent providers.""" from __future__ import unicode_literals -from medusa.providers.torrent.html import (abnormal, alpharatio, anidex, - animetorrents, archetorrent, - avistaz, bithdtv, bjshare, cinemaz, - elitetracker, gimmepeers, hdspace, - hdtorrents, hebits, iptorrents, - limetorrents, morethantv, nebulance, - nordicbits, pretome, privatehd, - scenetime, sdbits, shanaproject, - speedcd, thepiratebay, tntvillage, - tokyotoshokan, torrentbytes, - torrenting, tvchaosuk, yggtorrent, - zooqle) -from medusa.providers.torrent.json import (animebytes, bitcannon, btn, - danishbits, hdbits, ncore, norbits, - rarbg, torrentday, torrentleech, - xthor) -from medusa.providers.torrent.rss import nyaa, rsstorrent, shazbat -from medusa.providers.torrent.torznab import torznab -from medusa.providers.torrent.xml import torrentz2 +from medusa.providers.torrent.html import ( + abnormal, + alpharatio, + anidex, + animetorrents, + archetorrent, + avistaz, + bithdtv, + bjshare, + cinemaz, + elitetracker, + gimmepeers, + hdspace, + hdtorrents, + hebits, + iptorrents, + limetorrents, + morethantv, + nebulance, + nordicbits, + pretome, + privatehd, + scenetime, + sdbits, + shanaproject, + speedcd, + thepiratebay, + tntvillage, + tokyotoshokan, + torrentbytes, + torrenting, + tvchaosuk, + yggtorrent, + zooqle, +) +from medusa.providers.torrent.json import ( + animebytes, + bitcannon, + btn, + danishbits, + hdbits, + ncore, + norbits, + rarbg, + torrentday, + torrentleech, + xthor, +) +from medusa.providers.torrent.rss import ( + nyaa, + rsstorrent, + shazbat, +) +from medusa.providers.torrent.torznab import ( + torznab, +) +from medusa.providers.torrent.xml import ( + torrentz2, +) __all__ = [ 'abnormal', 'alpharatio', 'animebytes', 'archetorrent', 'bithdtv', 'danishbits', From 665224b32d9ec2da71b42588ae5a6dda23e4e7e2 Mon Sep 17 00:00:00 2001 From: Mark Stein Date: Thu, 2 May 2019 02:35:05 -0400 Subject: [PATCH 18/35] Add files via upload --- .../slim/static/images/providers/gimmepeers.png | Bin 0 -> 3126 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 themes-default/slim/static/images/providers/gimmepeers.png diff --git a/themes-default/slim/static/images/providers/gimmepeers.png b/themes-default/slim/static/images/providers/gimmepeers.png new file mode 100644 index 0000000000000000000000000000000000000000..e086e38c4e1eac7455fdd28b0c97fb597a90bcad GIT binary patch literal 3126 zcmV-649W9}P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rI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3DL-@JL9>R|hGO|A5)d8v+ z>;imu9~t`>KsExp7^?@@%+11&?CJv4XvSu@CrL9lyFF?&LrCLK(#-LHx*C|^`DzQm ze6>Zr&6uyYoG({|R7{s^4#yLE^2KJi2Oxa?up+iQLjd$-L8(dE5d%oltgIhkx?Ed; zo-6gy#YjL4OQj%P0<aw>is>c QTmS$707*qoM6N<$g6-YUYXATM literal 0 HcmV?d00001 From 6479d9f3fd55c2b7c522141390c26db3addd1f9e Mon Sep 17 00:00:00 2001 From: mystycs Date: Thu, 2 May 2019 11:11:19 -0400 Subject: [PATCH 19/35] pr fixes --- medusa/providers/torrent/html/gimmepeers.py | 110 ++++++++++---------- 1 file changed, 56 insertions(+), 54 deletions(-) diff --git a/medusa/providers/torrent/html/gimmepeers.py b/medusa/providers/torrent/html/gimmepeers.py index 441501fc23..738c5267ff 100644 --- a/medusa/providers/torrent/html/gimmepeers.py +++ b/medusa/providers/torrent/html/gimmepeers.py @@ -11,6 +11,7 @@ from medusa.helper.common import convert_size from medusa.providers.torrent.torrent_provider import TorrentProvider +from requests.compat import urljoin from requests.utils import dict_from_cookiejar @@ -21,60 +22,31 @@ def __init__(self): TorrentProvider.__init__(self, 'GimmePeers') + self.url = 'https://www.gimmepeers.com' self.urls = { - 'base_url': 'https://www.gimmepeers.com', - 'login': 'https://www.gimmepeers.com/takelogin.php', - 'detail': 'https://www.gimmepeers.com/details.php?id=%s', - 'search': 'https://www.gimmepeers.com/browse.php', - 'download': 'https://gimmepeers.com/%s', + 'login': urljoin(self.url, 'takelogin.php'), + 'search': urljoin(self.url, 'browse.php'), + 'download': urljoin(self.url, '%s'), } - self.url = self.urls['base_url'] - self.username = None self.password = None - self.minseed = None - self.minleech = None self.cache = tv.Cache(self) self.search_params = { - # c20=1&c21=1&c25=1&c24=1&c23=1&c22=1&c1=1 - 'c20': 1, 'c21': 1, 'c25': 1, 'c24': 1, 'c23': 1, 'c22': 1, 'c1': 1 - } - - def _check_auth(self): - if not self.username or not self.password: - logger.log(u'Invalid username or password. Check your settings', logger.WARNING) - - return True - - def login(self): - """Login method used for logging in before doing search and torrent downloads.""" - if any(dict_from_cookiejar(self.session.cookies).values()): - return True - - login_params = { - 'username': self.username, - 'password': self.password, - 'ssl': 'yes' + 'c20': 1, + 'c21': 1, + 'c25': 1, + 'c24': 1, + 'c23': 1, + 'c22': 1, + 'c1': 1 } - response = self.session.post(self.urls['login'], data=login_params) - if not response or not response.text: - logger.log(u'Unable to connect to provider', logger.WARNING) - return False - - if re.search('Username or password incorrect!', response.text): - logger.log(u'Invalid username or password. Check your settings', logger.WARNING) - return False - - return True - def search(self, search_strings, age=0, ep_obj=None, **kwargs): # pylint: disable=too-many-locals """ Search a provider and parse the results. - :param search_strings: A dict with mode (key) and the search value (value) :param age: Not used :param ep_obj: Not used @@ -90,7 +62,7 @@ def search(self, search_strings, age=0, ep_obj=None, **kwargs): # pylint: disab for search_string in search_strings[mode]: if mode != 'RSS': logger.log(u'Search string: {0}'.format - (search_string.decode('utf-8')), logger.DEBUG) + (search_string), logger.DEBUG) self.search_params['search'] = search_string @@ -105,7 +77,6 @@ def search(self, search_strings, age=0, ep_obj=None, **kwargs): # pylint: disab def parse(self, data, mode): """ Parse search results for items. - :param data: The raw response from a search :param mode: The current mode used to search, e.g. RSS :return: A list of items found @@ -127,31 +98,34 @@ def parse(self, data, mode): link = cells[1].find('a') download_url = self.urls['download'] % cells[2].find('a')['href'] - title = link.getText() + + if not all([title, download_url]): + continue + seeders = int(cells[10].getText().replace(',', '')) leechers = int(cells[11].getText().replace(',', '')) torrent_size = cells[8].getText() size = convert_size(torrent_size) or -1 - # except (AttributeError, TypeError): - # continue - if not all([title, download_url]): - continue - - # Filter unseeded torrent + # Filter unseeded torrent if seeders < self.minseed or leechers < self.minleech: if mode != 'RSS': logger.log(u"Discarding torrent because it doesn't meet the minimum seeders or leechers: {0} (S:{1} L:{2})".format (title, seeders, leechers), logger.DEBUG) continue - if seeders >= 32768 or leechers >= 32768: - continue - - item = {'title': title, 'link': download_url, 'size': size, 'seeders': seeders, 'leechers': leechers, 'hash': ''} + item = { + 'title': title, + 'link': download_url, + 'size': size, + 'seeders': seeders, + 'leechers': leechers, + 'hash': '', + } if mode != 'RSS': - logger.log(u'Found result: {0} with {1} seeders and {2} leechers'.format(title, seeders, leechers), logger.DEBUG) + logger.debug('Found result: {0} with {1} seeders and {2} leechers', + title, seeders, leechers) items.append(item) @@ -160,5 +134,33 @@ def parse(self, data, mode): return items + def login(self): + """Login method used for logging in before doing search and torrent downloads.""" + if any(dict_from_cookiejar(self.session.cookies).values()): + return True + + login_params = { + 'username': self.username, + 'password': self.password, + 'ssl': 'yes' + } + + response = self.session.post(self.urls['login'], data=login_params) + if not response or not response.text: + logger.log(u'Unable to connect to provider', logger.WARNING) + return False + + if re.search('Username or password incorrect!', response.text): + logger.log(u'Invalid username or password. Check your settings', logger.WARNING) + return False + + return True + + def _check_auth(self): + if not self.username or not self.password: + logger.log(u'Invalid username or password. Check your settings', logger.WARNING) + + return True + provider = GimmePeersProvider() From d89b01a17afab11e82bf9a8cd9e9e19cdd3e5e3a Mon Sep 17 00:00:00 2001 From: mystycs Date: Thu, 2 May 2019 11:14:55 -0400 Subject: [PATCH 20/35] pr fix minseed --- medusa/providers/torrent/html/gimmepeers.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/medusa/providers/torrent/html/gimmepeers.py b/medusa/providers/torrent/html/gimmepeers.py index 738c5267ff..e4867c52cb 100644 --- a/medusa/providers/torrent/html/gimmepeers.py +++ b/medusa/providers/torrent/html/gimmepeers.py @@ -109,10 +109,11 @@ def parse(self, data, mode): size = convert_size(torrent_size) or -1 # Filter unseeded torrent - if seeders < self.minseed or leechers < self.minleech: + if seeders < self.minseed: if mode != 'RSS': - logger.log(u"Discarding torrent because it doesn't meet the minimum seeders or leechers: {0} (S:{1} L:{2})".format - (title, seeders, leechers), logger.DEBUG) + log.debug("Discarding torrent because it doesn't meet the" + ' minimum seeders: {0}. Seeders: {1}', + title, seeders) continue item = { From da367a06ef19e9f4fbe1a425753072fc503ae9a2 Mon Sep 17 00:00:00 2001 From: mystycs Date: Thu, 2 May 2019 11:24:10 -0400 Subject: [PATCH 21/35] fix logger --- medusa/providers/torrent/html/gimmepeers.py | 23 +++++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/medusa/providers/torrent/html/gimmepeers.py b/medusa/providers/torrent/html/gimmepeers.py index e4867c52cb..c4673ac767 100644 --- a/medusa/providers/torrent/html/gimmepeers.py +++ b/medusa/providers/torrent/html/gimmepeers.py @@ -4,16 +4,21 @@ from __future__ import unicode_literals +import logging import re from medusa import logger, tv from medusa.bs4_parser import BS4Parser from medusa.helper.common import convert_size +from medusa.logger.adapters.style import BraceAdapter from medusa.providers.torrent.torrent_provider import TorrentProvider from requests.compat import urljoin from requests.utils import dict_from_cookiejar +log = BraceAdapter(logging.getLogger(__name__)) +log.logger.addHandler(logging.NullHandler()) + class GimmePeersProvider(TorrentProvider): """GimmePeers Torrent provider.""" @@ -58,11 +63,11 @@ def search(self, search_strings, age=0, ep_obj=None, **kwargs): # pylint: disab for mode in search_strings: - logger.log(u'Search Mode: {0}'.format(mode), logger.DEBUG) + log.debug(u'Search Mode: {0}'.format(mode)) for search_string in search_strings[mode]: if mode != 'RSS': - logger.log(u'Search string: {0}'.format - (search_string), logger.DEBUG) + log.debug(u'Search string: {0}'.format + (search_string)) self.search_params['search'] = search_string @@ -89,7 +94,7 @@ def parse(self, data, mode): # Continue only if one Release is found if len(torrent_rows) < 2: - logger.log(u'Data returned from provider does not contain any torrents', logger.DEBUG) + log.debug(u'Data returned from provider does not contain any torrents') return items for result in torrent_rows[1:]: @@ -125,13 +130,13 @@ def parse(self, data, mode): 'hash': '', } if mode != 'RSS': - logger.debug('Found result: {0} with {1} seeders and {2} leechers', + log.debug('Found result: {0} with {1} seeders and {2} leechers', title, seeders, leechers) items.append(item) except (AttributeError, TypeError, KeyError, ValueError, IndexError): - logger.exception('Failed parsing provider.') + log.exception('Failed parsing provider.') return items @@ -148,18 +153,18 @@ def login(self): response = self.session.post(self.urls['login'], data=login_params) if not response or not response.text: - logger.log(u'Unable to connect to provider', logger.WARNING) + log.debug(u'Unable to connect to provider') return False if re.search('Username or password incorrect!', response.text): - logger.log(u'Invalid username or password. Check your settings', logger.WARNING) + log.debug(u'Invalid username or password. Check your settings') return False return True def _check_auth(self): if not self.username or not self.password: - logger.log(u'Invalid username or password. Check your settings', logger.WARNING) + log.debug(u'Invalid username or password. Check your settings') return True From 8ee9887cd3910b902561fedceb4dd4c1fb39a815 Mon Sep 17 00:00:00 2001 From: mystycs Date: Thu, 2 May 2019 11:25:42 -0400 Subject: [PATCH 22/35] remove logger since unused --- medusa/providers/torrent/html/gimmepeers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/medusa/providers/torrent/html/gimmepeers.py b/medusa/providers/torrent/html/gimmepeers.py index c4673ac767..6d4612ee35 100644 --- a/medusa/providers/torrent/html/gimmepeers.py +++ b/medusa/providers/torrent/html/gimmepeers.py @@ -7,7 +7,7 @@ import logging import re -from medusa import logger, tv +from medusa import tv from medusa.bs4_parser import BS4Parser from medusa.helper.common import convert_size from medusa.logger.adapters.style import BraceAdapter From 265413de33943e0f41fadeea34e5f6e53881b34d Mon Sep 17 00:00:00 2001 From: mystycs Date: Thu, 2 May 2019 11:33:08 -0400 Subject: [PATCH 23/35] Update gimmepeers.py --- medusa/providers/torrent/html/gimmepeers.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/medusa/providers/torrent/html/gimmepeers.py b/medusa/providers/torrent/html/gimmepeers.py index 6d4612ee35..5bbe54ad62 100644 --- a/medusa/providers/torrent/html/gimmepeers.py +++ b/medusa/providers/torrent/html/gimmepeers.py @@ -52,6 +52,7 @@ def __init__(self): def search(self, search_strings, age=0, ep_obj=None, **kwargs): # pylint: disable=too-many-locals """ Search a provider and parse the results. + :param search_strings: A dict with mode (key) and the search value (value) :param age: Not used :param ep_obj: Not used @@ -66,8 +67,7 @@ def search(self, search_strings, age=0, ep_obj=None, **kwargs): # pylint: disab log.debug(u'Search Mode: {0}'.format(mode)) for search_string in search_strings[mode]: if mode != 'RSS': - log.debug(u'Search string: {0}'.format - (search_string)) + log.debug(u'Search string: {0}'.format(search_string)) self.search_params['search'] = search_string @@ -82,6 +82,7 @@ def search(self, search_strings, age=0, ep_obj=None, **kwargs): # pylint: disab def parse(self, data, mode): """ Parse search results for items. + :param data: The raw response from a search :param mode: The current mode used to search, e.g. RSS :return: A list of items found From 8f1f7a5b1d2e9a0ad5a886b51841337b1ee56e3a Mon Sep 17 00:00:00 2001 From: mystycs Date: Thu, 2 May 2019 11:38:47 -0400 Subject: [PATCH 24/35] remove whitespace --- medusa/providers/torrent/html/gimmepeers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/medusa/providers/torrent/html/gimmepeers.py b/medusa/providers/torrent/html/gimmepeers.py index 5bbe54ad62..753bf97d9e 100644 --- a/medusa/providers/torrent/html/gimmepeers.py +++ b/medusa/providers/torrent/html/gimmepeers.py @@ -52,7 +52,7 @@ def __init__(self): def search(self, search_strings, age=0, ep_obj=None, **kwargs): # pylint: disable=too-many-locals """ Search a provider and parse the results. - + :param search_strings: A dict with mode (key) and the search value (value) :param age: Not used :param ep_obj: Not used @@ -82,7 +82,7 @@ def search(self, search_strings, age=0, ep_obj=None, **kwargs): # pylint: disab def parse(self, data, mode): """ Parse search results for items. - + :param data: The raw response from a search :param mode: The current mode used to search, e.g. RSS :return: A list of items found From 65f9a22bf07e36110fed675a18b8fdf41e41394e Mon Sep 17 00:00:00 2001 From: mystycs Date: Thu, 2 May 2019 15:17:22 -0400 Subject: [PATCH 25/35] replace format with urljoin --- medusa/providers/torrent/html/gimmepeers.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/medusa/providers/torrent/html/gimmepeers.py b/medusa/providers/torrent/html/gimmepeers.py index 753bf97d9e..6a72f3a028 100644 --- a/medusa/providers/torrent/html/gimmepeers.py +++ b/medusa/providers/torrent/html/gimmepeers.py @@ -31,7 +31,6 @@ def __init__(self): self.urls = { 'login': urljoin(self.url, 'takelogin.php'), 'search': urljoin(self.url, 'browse.php'), - 'download': urljoin(self.url, '%s'), } self.username = None @@ -103,7 +102,7 @@ def parse(self, data, mode): cells = result('td') link = cells[1].find('a') - download_url = self.urls['download'] % cells[2].find('a')['href'] + download_url = urljoin(self.url, cells[2].find('a')['href']) title = link.getText() if not all([title, download_url]): From 6259fc65bab92c74b36d82d42c44b194ff1502d2 Mon Sep 17 00:00:00 2001 From: mystycs Date: Thu, 2 May 2019 15:48:45 -0400 Subject: [PATCH 26/35] pr fixes + add pubdate --- medusa/providers/torrent/html/gimmepeers.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/medusa/providers/torrent/html/gimmepeers.py b/medusa/providers/torrent/html/gimmepeers.py index 6a72f3a028..f99653fc51 100644 --- a/medusa/providers/torrent/html/gimmepeers.py +++ b/medusa/providers/torrent/html/gimmepeers.py @@ -51,7 +51,6 @@ def __init__(self): def search(self, search_strings, age=0, ep_obj=None, **kwargs): # pylint: disable=too-many-locals """ Search a provider and parse the results. - :param search_strings: A dict with mode (key) and the search value (value) :param age: Not used :param ep_obj: Not used @@ -71,7 +70,8 @@ def search(self, search_strings, age=0, ep_obj=None, **kwargs): # pylint: disab self.search_params['search'] = search_string data = self.session.get(self.urls['search'], params=self.search_params) - if not data: + if not data or not data.content: + log.debug('No data returned from provider') continue results += self.parse(data.text, mode) @@ -81,7 +81,6 @@ def search(self, search_strings, age=0, ep_obj=None, **kwargs): # pylint: disab def parse(self, data, mode): """ Parse search results for items. - :param data: The raw response from a search :param mode: The current mode used to search, e.g. RSS :return: A list of items found @@ -103,14 +102,14 @@ def parse(self, data, mode): link = cells[1].find('a') download_url = urljoin(self.url, cells[2].find('a')['href']) - title = link.getText() + title = link.get_text() if not all([title, download_url]): continue - seeders = int(cells[10].getText().replace(',', '')) - leechers = int(cells[11].getText().replace(',', '')) - torrent_size = cells[8].getText() + seeders = int(cells[10].get_text().replace(',', '')) + leechers = int(cells[11].get_text().replace(',', '')) + torrent_size = cells[8].get_text() size = convert_size(torrent_size) or -1 # Filter unseeded torrent @@ -121,13 +120,16 @@ def parse(self, data, mode): title, seeders) continue + pubdate_raw = cells[6].get_text() + pubdate = self.parse_pubdate(pubdate_raw) + item = { 'title': title, 'link': download_url, 'size': size, 'seeders': seeders, 'leechers': leechers, - 'hash': '', + 'pubdate': pubdate, } if mode != 'RSS': log.debug('Found result: {0} with {1} seeders and {2} leechers', @@ -165,6 +167,7 @@ def login(self): def _check_auth(self): if not self.username or not self.password: log.debug(u'Invalid username or password. Check your settings') + return False return True From 33667b436cf62d7b08270692b5b2a087af188da6 Mon Sep 17 00:00:00 2001 From: mystycs Date: Thu, 2 May 2019 15:54:39 -0400 Subject: [PATCH 27/35] pep8 whitespace fix --- medusa/providers/torrent/html/gimmepeers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/medusa/providers/torrent/html/gimmepeers.py b/medusa/providers/torrent/html/gimmepeers.py index f99653fc51..6a0d080f35 100644 --- a/medusa/providers/torrent/html/gimmepeers.py +++ b/medusa/providers/torrent/html/gimmepeers.py @@ -51,6 +51,7 @@ def __init__(self): def search(self, search_strings, age=0, ep_obj=None, **kwargs): # pylint: disable=too-many-locals """ Search a provider and parse the results. + :param search_strings: A dict with mode (key) and the search value (value) :param age: Not used :param ep_obj: Not used @@ -81,6 +82,7 @@ def search(self, search_strings, age=0, ep_obj=None, **kwargs): # pylint: disab def parse(self, data, mode): """ Parse search results for items. + :param data: The raw response from a search :param mode: The current mode used to search, e.g. RSS :return: A list of items found From 55192f03624368d600d9eaf839f4558e008095f9 Mon Sep 17 00:00:00 2001 From: mystycs Date: Thu, 2 May 2019 15:55:22 -0400 Subject: [PATCH 28/35] pep8 whitespace fix --- medusa/providers/torrent/html/gimmepeers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/medusa/providers/torrent/html/gimmepeers.py b/medusa/providers/torrent/html/gimmepeers.py index 6a0d080f35..2f997d72eb 100644 --- a/medusa/providers/torrent/html/gimmepeers.py +++ b/medusa/providers/torrent/html/gimmepeers.py @@ -51,7 +51,7 @@ def __init__(self): def search(self, search_strings, age=0, ep_obj=None, **kwargs): # pylint: disable=too-many-locals """ Search a provider and parse the results. - + :param search_strings: A dict with mode (key) and the search value (value) :param age: Not used :param ep_obj: Not used @@ -82,7 +82,7 @@ def search(self, search_strings, age=0, ep_obj=None, **kwargs): # pylint: disab def parse(self, data, mode): """ Parse search results for items. - + :param data: The raw response from a search :param mode: The current mode used to search, e.g. RSS :return: A list of items found From 2d38ae79fe1fa956a24f32b99a14060a38b6e455 Mon Sep 17 00:00:00 2001 From: mystycs Date: Thu, 2 May 2019 16:17:01 -0400 Subject: [PATCH 29/35] fix size --- medusa/providers/torrent/html/gimmepeers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/medusa/providers/torrent/html/gimmepeers.py b/medusa/providers/torrent/html/gimmepeers.py index 2f997d72eb..9b72bfb595 100644 --- a/medusa/providers/torrent/html/gimmepeers.py +++ b/medusa/providers/torrent/html/gimmepeers.py @@ -87,6 +87,7 @@ def parse(self, data, mode): :param mode: The current mode used to search, e.g. RSS :return: A list of items found """ + items = [] with BS4Parser(data, 'html5lib') as html: @@ -111,7 +112,7 @@ def parse(self, data, mode): seeders = int(cells[10].get_text().replace(',', '')) leechers = int(cells[11].get_text().replace(',', '')) - torrent_size = cells[8].get_text() + torrent_size = cells[5].get_text(' ') size = convert_size(torrent_size) or -1 # Filter unseeded torrent From be149ed8daee67420cb5b40a2f2871dc009dae96 Mon Sep 17 00:00:00 2001 From: mystycs Date: Thu, 2 May 2019 16:22:38 -0400 Subject: [PATCH 30/35] whitespace fix --- medusa/providers/torrent/html/gimmepeers.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/medusa/providers/torrent/html/gimmepeers.py b/medusa/providers/torrent/html/gimmepeers.py index 9b72bfb595..d92e5fef01 100644 --- a/medusa/providers/torrent/html/gimmepeers.py +++ b/medusa/providers/torrent/html/gimmepeers.py @@ -86,8 +86,7 @@ def parse(self, data, mode): :param data: The raw response from a search :param mode: The current mode used to search, e.g. RSS :return: A list of items found - """ - + """ items = [] with BS4Parser(data, 'html5lib') as html: From 533416c1de5235500ae0664070d249777a8760e1 Mon Sep 17 00:00:00 2001 From: mystycs Date: Thu, 2 May 2019 16:27:46 -0400 Subject: [PATCH 31/35] remove trailing whitespace --- medusa/providers/torrent/html/gimmepeers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/medusa/providers/torrent/html/gimmepeers.py b/medusa/providers/torrent/html/gimmepeers.py index d92e5fef01..5bd3a0a9e3 100644 --- a/medusa/providers/torrent/html/gimmepeers.py +++ b/medusa/providers/torrent/html/gimmepeers.py @@ -86,7 +86,7 @@ def parse(self, data, mode): :param data: The raw response from a search :param mode: The current mode used to search, e.g. RSS :return: A list of items found - """ + """ items = [] with BS4Parser(data, 'html5lib') as html: From 8386aae6aee20400297029b4c58e1ffacad9d9ab Mon Sep 17 00:00:00 2001 From: Dario Date: Fri, 3 May 2019 10:15:02 +0200 Subject: [PATCH 32/35] Small changes --- medusa/providers/torrent/html/gimmepeers.py | 71 ++++++++++----------- 1 file changed, 34 insertions(+), 37 deletions(-) diff --git a/medusa/providers/torrent/html/gimmepeers.py b/medusa/providers/torrent/html/gimmepeers.py index 5bd3a0a9e3..749b867053 100644 --- a/medusa/providers/torrent/html/gimmepeers.py +++ b/medusa/providers/torrent/html/gimmepeers.py @@ -24,8 +24,11 @@ class GimmePeersProvider(TorrentProvider): """GimmePeers Torrent provider.""" def __init__(self): + """Initialize the class.""" + super(GimmePeersProvider, self).__init__('GimmePeers') - TorrentProvider.__init__(self, 'GimmePeers') + self.username = None + self.password = None self.url = 'https://www.gimmepeers.com' self.urls = { @@ -33,22 +36,12 @@ def __init__(self): 'search': urljoin(self.url, 'browse.php'), } - self.username = None - self.password = None + # Proper Strings + self.proper_strings = ['PROPER', 'REPACK', 'REAL', 'RERIP'] self.cache = tv.Cache(self) - self.search_params = { - 'c20': 1, - 'c21': 1, - 'c25': 1, - 'c24': 1, - 'c23': 1, - 'c22': 1, - 'c1': 1 - } - - def search(self, search_strings, age=0, ep_obj=None, **kwargs): # pylint: disable=too-many-locals + def search(self, search_strings, age=0, ep_obj=None, **kwargs): """ Search a provider and parse the results. @@ -61,21 +54,33 @@ def search(self, search_strings, age=0, ep_obj=None, **kwargs): # pylint: disab if not self.login(): return results + search_params = { + 'c20': 1, + 'c21': 1, + 'c25': 1, + 'c24': 1, + 'c23': 1, + 'c22': 1, + 'c1': 1, + } + for mode in search_strings: + log.debug('Search Mode: {0}', mode) - log.debug(u'Search Mode: {0}'.format(mode)) for search_string in search_strings[mode]: + if mode != 'RSS': - log.debug(u'Search string: {0}'.format(search_string)) + log.debug('Search string: {search}', + {'search': search_string}) self.search_params['search'] = search_string - data = self.session.get(self.urls['search'], params=self.search_params) - if not data or not data.content: + response = self.session.get(self.urls['search'], params=search_params) + if not response or not response.text: log.debug('No data returned from provider') continue - results += self.parse(data.text, mode) + results += self.parse(response.text, mode) return results @@ -93,26 +98,23 @@ def parse(self, data, mode): torrent_table = html.find('table', class_='browsetable') torrent_rows = torrent_table('tr') if torrent_table else [] - # Continue only if one Release is found + # Continue only if one release is found if len(torrent_rows) < 2: - log.debug(u'Data returned from provider does not contain any torrents') + log.debug('Data returned from provider does not contain any torrents') return items for result in torrent_rows[1:]: - try: - cells = result('td') + cells = result('td') + try: link = cells[1].find('a') download_url = urljoin(self.url, cells[2].find('a')['href']) title = link.get_text() - if not all([title, download_url]): continue seeders = int(cells[10].get_text().replace(',', '')) leechers = int(cells[11].get_text().replace(',', '')) - torrent_size = cells[5].get_text(' ') - size = convert_size(torrent_size) or -1 # Filter unseeded torrent if seeders < self.minseed: @@ -122,6 +124,9 @@ def parse(self, data, mode): title, seeders) continue + torrent_size = cells[5].get_text(' ') + size = convert_size(torrent_size) or -1 + pubdate_raw = cells[6].get_text() pubdate = self.parse_pubdate(pubdate_raw) @@ -138,7 +143,6 @@ def parse(self, data, mode): title, seeders, leechers) items.append(item) - except (AttributeError, TypeError, KeyError, ValueError, IndexError): log.exception('Failed parsing provider.') @@ -152,23 +156,16 @@ def login(self): login_params = { 'username': self.username, 'password': self.password, - 'ssl': 'yes' + 'ssl': 'yes', } response = self.session.post(self.urls['login'], data=login_params) if not response or not response.text: - log.debug(u'Unable to connect to provider') + log.debug('Unable to connect to provider') return False if re.search('Username or password incorrect!', response.text): - log.debug(u'Invalid username or password. Check your settings') - return False - - return True - - def _check_auth(self): - if not self.username or not self.password: - log.debug(u'Invalid username or password. Check your settings') + log.debug('Invalid username or password. Check your settings') return False return True From 6cf0515db405468bda5ce117a46d7a8585a073e6 Mon Sep 17 00:00:00 2001 From: Dario Date: Fri, 3 May 2019 10:31:21 +0200 Subject: [PATCH 33/35] Optimize icon --- .../static/images/providers/gimmepeers.png | Bin 3126 -> 1335 bytes .../dark/assets/img/providers/gimmepeers.png | Bin 3126 -> 323 bytes .../light/assets/img/providers/gimmepeers.png | Bin 3126 -> 323 bytes 3 files changed, 0 insertions(+), 0 deletions(-) diff --git a/themes-default/slim/static/images/providers/gimmepeers.png b/themes-default/slim/static/images/providers/gimmepeers.png index e086e38c4e1eac7455fdd28b0c97fb597a90bcad..2d154f5343baedc5624178bcc03bd1a907956f80 100644 GIT binary patch literal 1335 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nAI{vB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#AB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z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0004DNkl;x1w(#i70_xbKWpAb?ZJcV6*x#d3DL-@JL9>R|hGO|A5)d8v+ z>;imu9~t`>KsExp7^?@@%+11&?CJv4XvSu@CrL9lyFF?&LrCLK(#-LHx*C|^`DzQm ze6>Zr&6uyYoG({|R7{s^4#yLE^2KJi2Oxa?up+iQLjd$-L8(dE5d%oltgIhkx?Ed; zo-6gy#YjL4OQj%P0<aw>is>c QTmS$707*qoM6N<$g6-YUYXATM diff --git a/themes/dark/assets/img/providers/gimmepeers.png b/themes/dark/assets/img/providers/gimmepeers.png index e086e38c4e1eac7455fdd28b0c97fb597a90bcad..8b250049e656887028f28690915d7f4536f30e71 100644 GIT binary patch delta 307 zcmV-30nGlk7{daP8Gi!+001a04^sdD0ANr|R7C(xcK}Uy08MxRPImxKcmPg$08V-U zPj~=Nc>qs(Bwd3fUV}eujX!OTKW>dwdX`jsmuH8dXNaMAlc{)=sd$vCho7>CpR=R2 z!?3^0$g(?D_4oMy|Nn({m^=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}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0004DNkl;x1w(#i70_xbKWpAb?ZJcV6*x#d3DL-@JL9>R|hGO|A5)d8v+ z>;imu9~t`>KsExp7^?@@%+11&?CJv4XvSu@CrL9lyFF?&LrCLK(#-LHx*C|^`DzQm ze6>Zr&6uyYoG({|R7{s^4#yLE^2KJi2Oxa?up+iQLjd$-L8(dE5d%oltgIhkx?Ed; zo-6gy#YjL4OQj%P0<aw>is>c QTmS$707*qoM6N<$g6-YUYXATM diff --git a/themes/light/assets/img/providers/gimmepeers.png b/themes/light/assets/img/providers/gimmepeers.png index e086e38c4e1eac7455fdd28b0c97fb597a90bcad..8b250049e656887028f28690915d7f4536f30e71 100644 GIT binary patch delta 307 zcmV-30nGlk7{daP8Gi!+001a04^sdD0ANr|R7C(xcK}Uy08MxRPImxKcmPg$08V-U zPj~=Nc>qs(Bwd3fUV}eujX!OTKW>dwdX`jsmuH8dXNaMAlc{)=sd$vCho7>CpR=R2 z!?3^0$g(?D_4oMy|Nn({m^=Ug0G>%iK~xwS1%JU=Zo)7W0Kj>+NlGdz z#1Fmy`A}7{lr8q_Oteu(m7?mc7i}O3)U}2JpaT^JC`x2B?5D`r?|zo=OBQkb%ttO- ztd>QKWxAiJyhNPtqL9#ID*{sBWiLwU{}fMx&y002ovPDHLk FV1nHojh_Gj literal 3126 zcmV-649W9}P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+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~t`>KsExp7^?@@%+11&?CJv4XvSu@CrL9lyFF?&LrCLK(#-LHx*C|^`DzQm ze6>Zr&6uyYoG({|R7{s^4#yLE^2KJi2Oxa?up+iQLjd$-L8(dE5d%oltgIhkx?Ed; zo-6gy#YjL4OQj%P0<aw>is>c QTmS$707*qoM6N<$g6-YUYXATM From 5f454f630746fc0da4c1dad4499f594f5d0d87fa Mon Sep 17 00:00:00 2001 From: Dario Date: Fri, 3 May 2019 10:42:39 +0200 Subject: [PATCH 34/35] Update gimmepeers.py --- medusa/providers/torrent/html/gimmepeers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/medusa/providers/torrent/html/gimmepeers.py b/medusa/providers/torrent/html/gimmepeers.py index 749b867053..57642d63ed 100644 --- a/medusa/providers/torrent/html/gimmepeers.py +++ b/medusa/providers/torrent/html/gimmepeers.py @@ -73,7 +73,7 @@ def search(self, search_strings, age=0, ep_obj=None, **kwargs): log.debug('Search string: {search}', {'search': search_string}) - self.search_params['search'] = search_string + search_params['search'] = search_string response = self.session.get(self.urls['search'], params=search_params) if not response or not response.text: From fa94fd49202f520e495ada73d2dfb090b753baec Mon Sep 17 00:00:00 2001 From: p0ps Date: Fri, 3 May 2019 10:47:21 +0200 Subject: [PATCH 35/35] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 329bcdb141..f211cbb913 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ #### New Features - Added nCore torrent provider ([#6537](https://github.com/pymedusa/Medusa/pull/6537)) +- Added Gimmepeers torrent provider (credits to @mystycs) ([#6635](https://github.com/pymedusa/Medusa/pull/6635)) #### Improvements