diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-06-09 13:58:27 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-06-09 13:58:27 +0200 |
commit | d2e46f208737760c65a58bfc21ad8fd0809c0b18 (patch) | |
tree | 2e3881dabd0ac0026173c0431af2dfea2d1b6405 | |
parent | Fix https://github.com/pyload/pyload/issues/1471 (diff) | |
download | pyload-d2e46f208737760c65a58bfc21ad8fd0809c0b18.tar.xz |
Fix https://github.com/pyload/pyload/issues/1472
-rw-r--r-- | module/plugins/crypter/UploadedToFolder.py | 21 | ||||
-rw-r--r-- | module/plugins/hoster/UploadedTo.py | 4 | ||||
-rw-r--r-- | module/plugins/internal/SimpleHoster.py | 4 |
3 files changed, 12 insertions, 17 deletions
diff --git a/module/plugins/crypter/UploadedToFolder.py b/module/plugins/crypter/UploadedToFolder.py index d54ed47eb..384168030 100644 --- a/module/plugins/crypter/UploadedToFolder.py +++ b/module/plugins/crypter/UploadedToFolder.py @@ -9,11 +9,10 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo class UploadedToFolder(SimpleCrypter): __name__ = "UploadedToFolder" __type__ = "crypter" - __version__ = "0.42" + __version__ = "0.43" - __pattern__ = r'http://(?:www\.)?(uploaded|ul)\.(to|net)/(f|folder|list)/(?P<ID>\w+)' - __config__ = [("use_premium" , "bool", "Use premium account if available" , True), - ("use_subfolder" , "bool", "Save package to subfolder" , True), + __pattern__ = r'https?://(?:www\.)?(uploaded|ul)\.(to|net)/(f|folder|list)/\w+' + __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """UploadedTo decrypter plugin""" @@ -21,17 +20,11 @@ class UploadedToFolder(SimpleCrypter): __authors__ = [("stickell", "l.stickell@yahoo.it")] - PLAIN_PATTERN = r'<small class="date"><a href="([\w/]+)" onclick=' - NAME_PATTERN = r'<title>(?P<N>.+?)<' + NAME_PATTERN = r'<title>(?P<N>.+?)<' + OFFLINE_PATTERN = r'>Page not found' + TEMP_OFFLINE_PATTERN = r'<title>uploaded\.net - Maintenance' - - def getLinks(self): - m = re.search(self.PLAIN_PATTERN, self.html) - if m is None: - self.error(_("PLAIN_PATTERN not found")) - - plain_link = urlparse.urljoin("http://uploaded.net/", m.group(1)) - return self.load(plain_link).split('\n')[:-1] + LINK_PATTERN = r'<h2><a href="(.+?)"' getInfo = create_getInfo(UploadedToFolder) diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py index 9c13b86dc..187653c2d 100644 --- a/module/plugins/hoster/UploadedTo.py +++ b/module/plugins/hoster/UploadedTo.py @@ -12,7 +12,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class UploadedTo(SimpleHoster): __name__ = "UploadedTo" __type__ = "hoster" - __version__ = "0.93" + __version__ = "0.94" __pattern__ = r'https?://(?:www\.)?(uploaded\.(to|net)|ul\.to)(/file/|/?\?id=|.*?&id=|/)(?P<ID>\w+)' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -29,7 +29,9 @@ class UploadedTo(SimpleHoster): API_KEY = "lhF2IeeprweDfu9ccWlxXVVypA5nA3EL" + OFFLINE_PATTERN = r'>Page not found' TEMP_OFFLINE_PATTERN = r'<title>uploaded\.net - Maintenance' + LINK_PREMIUM_PATTERN = r'<div class="tfree".*\s*<form method="post" action="(.+?)"' WAIT_PATTERN = r'Current waiting period: <span>(\d+)' diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index 3d4733790..49b29e280 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -430,9 +430,9 @@ class SimpleHoster(Hoster): #@TODO: Move to Hoster in 0.4.10 def _log(self, type, args): - msg = " | ".join((fs_encode(a) if isinstance(a, unicode) else + msg = " | ".join((fs_encode(a) if isinstance(a, unicode) else #@NOTE: `fs_encode` -> `encode` in 0.4.10 decode(a) if isinstance(a, str) else - str(a)).strip() for a in args if a) #@NOTE: `fs_encode` -> `encode` in 0.4.10 + str(a)).strip() for a in args if a) logger = getattr(self.core.log, type) logger("%(plugin)s[%(id)s]: %(msg)s" % {'plugin': self.__name__, 'id' : self.pyfile.id, |