diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-07-19 13:47:54 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-07-20 03:27:29 +0200 |
commit | 239475cfe71c6be77e4aca26a3cb54abc8660b64 (patch) | |
tree | dd456215084f78c70c54c8061d15a953c542f036 /module | |
parent | Remove testcodes in captcha plugins (diff) | |
download | pyload-239475cfe71c6be77e4aca26a3cb54abc8660b64.tar.xz |
[SockshareCom] Fix https://github.com/pyload/pyload/issues/696
Diffstat (limited to 'module')
-rw-r--r-- | module/plugins/hoster/SockshareCom.py | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/module/plugins/hoster/SockshareCom.py b/module/plugins/hoster/SockshareCom.py index 9818875c8..61df428db 100644 --- a/module/plugins/hoster/SockshareCom.py +++ b/module/plugins/hoster/SockshareCom.py @@ -1,20 +1,7 @@ # -*- coding: utf-8 -*- -############################################################################### -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -############################################################################### import re + from os import rename from module.plugins.hoster.UnrestrictLi import secondsToMidnight @@ -23,18 +10,22 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class SockshareCom(SimpleHoster): __name__ = "SockshareCom" + __version__ = "0.04" __type__ = "hoster" + __pattern__ = r'http://(?:www\.)?sockshare\.com/(mobile/)?(file|embed)/(?P<ID>\w+)' - __version__ = "0.03" + __description__ = """Sockshare.com hoster plugin""" __author_name__ = ("jeix", "stickell", "Walter Purcaro") __author_mail__ = ("jeix@hasnomail.de", "l.stickell@yahoo.it", "vuolter@gmail.com") FILE_INFO_PATTERN = r'site-content">\s*<h1>(?P<N>.+)<strong>\( (?P<S>[^)]+) \)</strong></h1>' OFFLINE_PATTERN = r'>This file doesn\'t exist, or has been removed.<' + TEMP_OFFLINE_PATTERN = r'(>This content server has been temporarily disabled for upgrades|Try again soon\\. You can still download it below\\.<)' FILE_URL_REPLACEMENTS = [(__pattern__, r'http://www.sockshare.com/file/\g<ID>')] + def setup(self): self.multiDL = self.resumeDownload = True self.chunkLimit = -1 @@ -56,7 +47,7 @@ class SockshareCom(SimpleHoster): if ">You have exceeded the daily stream limit for your country\\. You can wait until tomorrow" in self.html: self.logWarning("You have exceeded your daily stream limit for today") self.wait(secondsToMidnight(gmt=2), True) - elif "(>This content server has been temporarily disabled for upgrades|Try again soon\\. You can still download it below\\.<)" in self.html): + elif re.search(self.TEMP_OFFLINE_PATTERN, self.html): self.retry(wait_time=2 * 60 * 60, reason="Server temporarily offline") # 2 hours wait patterns = (r'(/get_file\.php\?id=[A-Z0-9]+&key=[a-zA-Z0-9=]+&original=1)', |