Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9a01b274ba | ||
|
|
f7ed835ba5 | ||
|
|
8af49b9508 | ||
|
|
998049a39d | ||
|
|
111bd1b07c | ||
|
|
a09c10aab6 |
@@ -5,6 +5,11 @@ import time
|
|||||||
import traceback
|
import traceback
|
||||||
import xml.etree.ElementTree as XMLTree
|
import xml.etree.ElementTree as XMLTree
|
||||||
|
|
||||||
|
try:
|
||||||
|
from xml.etree.ElementTree import ParseError as XmlParseError
|
||||||
|
except ImportError:
|
||||||
|
from xml.parsers.expat import ExpatError as XmlParseError
|
||||||
|
|
||||||
from couchpotato.core.event import addEvent, fireEvent
|
from couchpotato.core.event import addEvent, fireEvent
|
||||||
from couchpotato.core.helpers.encoding import ss
|
from couchpotato.core.helpers.encoding import ss
|
||||||
from couchpotato.core.helpers.variable import tryFloat, mergeDicts, md5, \
|
from couchpotato.core.helpers.variable import tryFloat, mergeDicts, md5, \
|
||||||
@@ -94,7 +99,7 @@ class Provider(Plugin):
|
|||||||
try:
|
try:
|
||||||
data = XMLTree.fromstring(ss(data))
|
data = XMLTree.fromstring(ss(data))
|
||||||
return self.getElements(data, item_path)
|
return self.getElements(data, item_path)
|
||||||
except XMLTree.ParseError:
|
except XmlParseError:
|
||||||
log.error('Invalid XML returned, check "%s" manually for issues', url)
|
log.error('Invalid XML returned, check "%s" manually for issues', url)
|
||||||
except:
|
except:
|
||||||
log.error('Failed to parsing %s: %s', (self.getName(), traceback.format_exc()))
|
log.error('Failed to parsing %s: %s', (self.getName(), traceback.format_exc()))
|
||||||
|
|||||||
@@ -13,12 +13,12 @@ log = CPLog(__name__)
|
|||||||
class Base(TorrentProvider):
|
class Base(TorrentProvider):
|
||||||
|
|
||||||
urls = {
|
urls = {
|
||||||
'test': 'https://theshack.us.to/',
|
'test': 'https://torrentshack.me/',
|
||||||
'login': 'https://theshack.us.to/login.php',
|
'login': 'https://torrentshack.me/login.php',
|
||||||
'login_check': 'https://theshack.us.to/inbox.php',
|
'login_check': 'https://torrentshack.me/inbox.php',
|
||||||
'detail': 'https://theshack.us.to/torrent/%s',
|
'detail': 'https://torrentshack.me/torrent/%s',
|
||||||
'search': 'https://theshack.us.to/torrents.php?action=advanced&searchstr=%s&scene=%s&filter_cat[%d]=1',
|
'search': 'https://torrentshack.me/torrents.php?action=advanced&searchstr=%s&scene=%s&filter_cat[%d]=1',
|
||||||
'download': 'https://theshack.us.to/%s',
|
'download': 'https://torrentshack.me/%s',
|
||||||
}
|
}
|
||||||
|
|
||||||
http_time_between_calls = 1 # Seconds
|
http_time_between_calls = 1 # Seconds
|
||||||
@@ -82,7 +82,7 @@ config = [{
|
|||||||
'tab': 'searcher',
|
'tab': 'searcher',
|
||||||
'list': 'torrent_providers',
|
'list': 'torrent_providers',
|
||||||
'name': 'TorrentShack',
|
'name': 'TorrentShack',
|
||||||
'description': '<a href="http://torrentshack.eu/">TorrentShack</a>',
|
'description': '<a href="https://torrentshack.me/">TorrentShack</a>',
|
||||||
'wizard': True,
|
'wizard': True,
|
||||||
'icon': 'iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABmElEQVQoFQXBzY2cVRiE0afqvd84CQiAnxWWtyxsS6ThINBYg2Dc7mZBMEjE4mzs6e9WcY5+ePNuVFJJodQAoLo+SaWCy9rcV8cmjah3CI6iYu7oRU30kE5xxELRfamklY3k1NL19sSm7vPzP/ZdNZzKVDaY2sPZJBh9fv5ITrmG2+Vp4e1sPchVqTCQZJnVXi+/L4uuAJGly1+Pw8CprLbi8Om7tbT19/XRqJUk11JP9uHj9ulxhXbvJbI9qJvr5YkGXFG2IBT8tXczt+sfzDZCp3765f3t9tHEHGEDACma77+8o4oATKk+/PfW9YmHruRFjWoVSFsVsGu1YSKq6Oc37+n98unPZSRlY7vsKDqN+92X3yR9+PdXee3iJNKMStqdcZqoTJbUSi5JOkpfRlhSI0mSpEmCFKoU7FqSNOLAk54uGwCStMUCgLrVic62g7oDoFmmdI+P3S0pDe1xvDqb6XrZqbtzShWNoh9fv/XQHaDdM9OqrZi2M7M3UrB2vlkPS1IbdEBk7UiSoD6VlZ6aKWer4aH4f/AvKoHUTjuyAAAAAElFTkSuQmCC',
|
'icon': 'iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABmElEQVQoFQXBzY2cVRiE0afqvd84CQiAnxWWtyxsS6ThINBYg2Dc7mZBMEjE4mzs6e9WcY5+ePNuVFJJodQAoLo+SaWCy9rcV8cmjah3CI6iYu7oRU30kE5xxELRfamklY3k1NL19sSm7vPzP/ZdNZzKVDaY2sPZJBh9fv5ITrmG2+Vp4e1sPchVqTCQZJnVXi+/L4uuAJGly1+Pw8CprLbi8Om7tbT19/XRqJUk11JP9uHj9ulxhXbvJbI9qJvr5YkGXFG2IBT8tXczt+sfzDZCp3765f3t9tHEHGEDACma77+8o4oATKk+/PfW9YmHruRFjWoVSFsVsGu1YSKq6Oc37+n98unPZSRlY7vsKDqN+92X3yR9+PdXee3iJNKMStqdcZqoTJbUSi5JOkpfRlhSI0mSpEmCFKoU7FqSNOLAk54uGwCStMUCgLrVic62g7oDoFmmdI+P3S0pDe1xvDqb6XrZqbtzShWNoh9fv/XQHaDdM9OqrZi2M7M3UrB2vlkPS1IbdEBk7UiSoD6VlZ6aKWer4aH4f/AvKoHUTjuyAAAAAElFTkSuQmCC',
|
||||||
'options': [
|
'options': [
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ class Base(TorrentProvider):
|
|||||||
|
|
||||||
search_url = self.urls['search'] % (domain, getIdentifier(movie))
|
search_url = self.urls['search'] % (domain, getIdentifier(movie))
|
||||||
|
|
||||||
data = self.getJsonData(search_url)
|
data = self.getJsonData(search_url) or {}
|
||||||
data = data.get('data')
|
data = data.get('data')
|
||||||
|
|
||||||
if isinstance(data, dict) and data.get('movies'):
|
if isinstance(data, dict) and data.get('movies'):
|
||||||
|
|||||||
@@ -63,8 +63,8 @@ class Scanner(Plugin):
|
|||||||
}
|
}
|
||||||
|
|
||||||
file_sizes = { # in MB
|
file_sizes = { # in MB
|
||||||
'movie': {'min': 300},
|
'movie': {'min': 200},
|
||||||
'trailer': {'min': 2, 'max': 250},
|
'trailer': {'min': 2, 'max': 199},
|
||||||
'backdrop': {'min': 0, 'max': 5},
|
'backdrop': {'min': 0, 'max': 5},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user