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