Private GIT

Skip to content
Snippets Groups Projects
Commit 412686d3 authored by PHD's avatar PHD Committed by miigotu
Browse files

Add Yggtorrent, remove T411, fix Cpasbien (#4118)

* Add midgetspy back to copywrite, because echelon sent a DMCA. (#3938)

* Show information in poster view in seperate DIV (#4011)

Added a new DIV to hold the show information.
This way custom CSS is more dynamic. And if original CSS is used, there is no harm.

* Revert "Show information in poster view in seperate DIV (#4011)" (#4016)

This reverts commit 72f937b3.

* Add Yggtorrent, remove T411, fix Cpasbien

* Update __init__.py
parent fdb17b8e
No related branches found
No related tags found
No related merge requests found
......@@ -37,7 +37,7 @@ class CpasbienProvider(TorrentProvider):
self.public = True
self.minseed = None
self.minleech = None
self.url = "http://www.cpasbien.cm"
self.url = "http://www.cpasbien.cx"
self.proper_strings = ['PROPER', 'REPACK']
self.cache = tvcache.TVCache(self)
......
# coding=utf-8
# Author: adaur <adaur.underground@gmail.com>
# Contributor: PHD <phd59fr@gmail.com>
#
# URL: https://sickrage.github.io
#
......@@ -69,7 +70,13 @@ class YggTorrentProvider(TorrentProvider): # pylint: disable=too-many-instance-
}
response = self.get_url(self.urls['login'], post_data=login_params, returns='text')
if response: # Yggtorrent return empty response if user is logged, so ...
if not response: # When you call /login if it's OK, it's return 200 with no body, i retry in main if it's logged !
response = self.get_url(self.url, returns='text')
if not response: # The provider is dead !!!
logger.log('Unable to connect to provider', logger.WARNING)
return False
if 'logout' not in response:
logger.log('Invalid username or password. Check your settings', logger.WARNING)
return False
......@@ -92,6 +99,8 @@ class YggTorrentProvider(TorrentProvider): # pylint: disable=too-many-instance-
try:
search_params = {
'category': "2145",
'subcategory' : "2184",
'q': re.sub(r'[()]', '', search_string)
}
data = self.get_url(self.urls['search'], params=search_params, returns='text')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment