diff options
-rw-r--r-- | module/plugins/accounts/BigfileTo.py (renamed from module/plugins/accounts/UploadableCh.py) | 15 | ||||
-rw-r--r-- | module/plugins/accounts/FilefactoryCom.py | 14 | ||||
-rw-r--r-- | module/plugins/crypter/BigfileToFolder.py (renamed from module/plugins/crypter/UploadableChFolder.py) | 17 | ||||
-rw-r--r-- | module/plugins/hoster/BigfileTo.py (renamed from module/plugins/hoster/UploadableCh.py) | 52 | ||||
-rw-r--r-- | module/plugins/hoster/OboomCom.py | 12 | ||||
-rw-r--r-- | module/plugins/hoster/UlozTo.py | 8 | ||||
-rw-r--r-- | module/plugins/hoster/UptoboxCom.py | 4 | ||||
-rw-r--r-- | module/plugins/internal/SimpleCrypter.py | 10 |
8 files changed, 73 insertions, 59 deletions
diff --git a/module/plugins/accounts/UploadableCh.py b/module/plugins/accounts/BigfileTo.py index a8f17ad6d..23f91e1f6 100644 --- a/module/plugins/accounts/UploadableCh.py +++ b/module/plugins/accounts/BigfileTo.py @@ -3,19 +3,20 @@ from module.plugins.internal.Account import Account -class UploadableCh(Account): - __name__ = "UploadableCh" +class BigfileTo(Account): + __name__ = "BigfileTo" __type__ = "account" - __version__ = "0.09" + __version__ = "0.10" __status__ = "testing" - __description__ = """Uploadable.ch account plugin""" + __description__ = """bigfile.to account plugin""" __license__ = "GPLv3" - __authors__ = [("Sasch", "gsasch@gmail.com")] + __authors__ = [("Sasch" , "gsasch@gmail.com" ), + ("GammaC0de", "nitzo2001[AT]yahoo[DOT]com")] def grab_info(self, user, password, data): - html = self.load("http://www.uploadable.ch/login.php") + html = self.load("https://www.bigfile.to/login.php") premium = '<a href="/logout.php"' in html trafficleft = -1 if premium else None @@ -24,7 +25,7 @@ class UploadableCh(Account): def signin(self, user, password, data): - html = self.load("http://www.uploadable.ch/login.php", + html = self.load("https://www.bigfile.to/login.php", post={'userName' : user, 'userPassword' : password, 'autoLogin' : "1", diff --git a/module/plugins/accounts/FilefactoryCom.py b/module/plugins/accounts/FilefactoryCom.py index 5be4f3cf6..527acbd82 100644 --- a/module/plugins/accounts/FilefactoryCom.py +++ b/module/plugins/accounts/FilefactoryCom.py @@ -11,13 +11,14 @@ from module.plugins.internal.Account import Account class FilefactoryCom(Account): __name__ = "FilefactoryCom" __type__ = "account" - __version__ = "0.21" + __version__ = "0.22" __status__ = "testing" __description__ = """Filefactory.com account plugin""" __license__ = "GPLv3" - __authors__ = [("zoidberg", "zoidberg@mujmail.cz"), - ("stickell", "l.stickell@yahoo.it")] + __authors__ = [("zoidberg", "zoidberg@mujmail.cz" ), + ("stickell", "l.stickell@yahoo.it" ), + ("GammaC0de", "nitzo2001[AT]yahoo[DOT]com")] VALID_UNTIL_PATTERN = r'Premium valid until: <strong>(?P<D>\d{1,2})\w{1,2} (?P<M>\w{3}), (?P<Y>\d{4})</strong>' @@ -31,6 +32,7 @@ class FilefactoryCom(Account): premium = True validuntil = re.sub(self.VALID_UNTIL_PATTERN, '\g<D> \g<M> \g<Y>', m.group(0)) validuntil = time.mktime(time.strptime(validuntil, "%d %b %Y")) + else: premium = False validuntil = -1 @@ -39,12 +41,14 @@ class FilefactoryCom(Account): def signin(self, user, password, data): - self.req.http.c.setopt(pycurl.REFERER, "http://www.filefactory.com/member/login.php") + html = self.load("https://www.filefactory.com/member/signin.php") + if "/member/signout.php" in html: + self.skip_login() html = self.load("https://www.filefactory.com/member/signin.php", post={'loginEmail' : user, 'loginPassword': password, 'Submit' : "Sign In"}) - if self.req.lastEffectiveURL != "http://www.filefactory.com/account/": + if "/member/signout.php" not in html: self.fail_login() diff --git a/module/plugins/crypter/UploadableChFolder.py b/module/plugins/crypter/BigfileToFolder.py index f108f0a4a..07ef6324b 100644 --- a/module/plugins/crypter/UploadableChFolder.py +++ b/module/plugins/crypter/BigfileToFolder.py @@ -3,24 +3,27 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter -class UploadableChFolder(SimpleCrypter): - __name__ = "UploadableChFolder" +class BigfileToFolder(SimpleCrypter): + __name__ = "BigfileToFolder" __type__ = "crypter" - __version__ = "0.08" + __version__ = "0.09" __status__ = "testing" - __pattern__ = r'http://(?:www\.)?uploadable\.ch/list/\w+' + __pattern__ = r'https?://(?:www\.)?(?:uploadable\.ch|bigfile\.to)/list/\w+' __config__ = [("activated" , "bool" , "Activated" , True ), ("use_premium" , "bool" , "Use premium account if available" , True ), ("folder_per_package", "Default;Yes;No", "Create folder for each package" , "Default"), ("max_wait" , "int" , "Reconnect if waiting time is greater than minutes", 10 )] - __description__ = """Uploadable.ch folder decrypter plugin""" + __description__ = """bigfile.to folder decrypter plugin""" __license__ = "GPLv3" - __authors__ = [("guidobelix", "guidobelix@hotmail.it"), - ("Walter Purcaro", "vuolter@gmail.com")] + __authors__ = [("guidobelix", "guidobelix@hotmail.it" ), + ("Walter Purcaro", "vuolter@gmail.com" ), + ("GammaC0de", "nitzo2001[AT]yahoo[DOT]com")] + URL_REPLACEMENTS = [("https?://uploadable\.ch", "https://bigfile.to")] + LINK_PATTERN = r'"(.+?)" class="icon_zipfile">' NAME_PATTERN = r'<div class="folder"><span> </span>(?P<N>.+?)</div>' OFFLINE_PATTERN = r'We are sorry... The URL you entered cannot be found on the server.' diff --git a/module/plugins/hoster/UploadableCh.py b/module/plugins/hoster/BigfileTo.py index ad38af8d9..045d28297 100644 --- a/module/plugins/hoster/UploadableCh.py +++ b/module/plugins/hoster/BigfileTo.py @@ -2,30 +2,32 @@ import re +from module.plugins.internal.misc import json from module.plugins.captcha.ReCaptcha import ReCaptcha from module.plugins.internal.SimpleHoster import SimpleHoster -class UploadableCh(SimpleHoster): - __name__ = "UploadableCh" +class BigfileTo(SimpleHoster): + __name__ = "BigfileTo" __type__ = "hoster" - __version__ = "0.16" + __version__ = "0.18" __status__ = "testing" - __pattern__ = r'http://(?:www\.)?uploadable\.ch/file/(?P<ID>\w+)' + __pattern__ = r'https?://(?:www\.)?(?:uploadable\.ch|bigfile.to)/file/(?P<ID>\w+)' __config__ = [("activated" , "bool", "Activated" , True), ("use_premium" , "bool", "Use premium account if available" , True), ("fallback" , "bool", "Fallback to free download if premium fails" , True), ("chk_filesize", "bool", "Check file size" , True), ("max_wait" , "int" , "Reconnect if waiting time is greater than minutes", 10 )] - __description__ = """Uploadable.ch hoster plugin""" + __description__ = """bigfile.to hoster plugin""" __license__ = "GPLv3" - __authors__ = [("zapp-brannigan", "fuerst.reinje@web.de"), - ("Walter Purcaro", "vuolter@gmail.com")] + __authors__ = [("zapp-brannigan", "fuerst.reinje@web.de" ), + ("Walter Purcaro", "vuolter@gmail.com" ), + ("GammaC0de" , "nitzo2001[AT]yahoo[DOT]com")] - URL_REPLACEMENTS = [(__pattern__ + ".*", r'http://www.uploadable.ch/file/\g<ID>')] + URL_REPLACEMENTS = [(__pattern__ + ".*", r'https://www.bigfile.to/file/\g<ID>')] INFO_PATTERN = r'div id=\"file_name\" title=.*>(?P<N>.+)<span class=\"filename_normal\">\((?P<S>[\d.]+) (?P<U>\w+)\)</span><' @@ -34,37 +36,35 @@ class UploadableCh(SimpleHoster): WAIT_PATTERN = r'>Please wait[^<]+' - RECAPTCHA_KEY = "6LdlJuwSAAAAAPJbPIoUhyqOJd7-yrah5Nhim5S3" + RECAPTCHA_KEY = "6LfZ0RETAAAAAOjhYT7V9ukeCT3wWccw98uc50vu" def handle_free(self, pyfile): #: Click the "free user" button and wait - a = self.load(pyfile.url, post={'downloadLink': "wait"}) - self.log_debug(a) + json_data = json.loads(self.load(pyfile.url, post={'downloadLink': "wait"})) - self.wait(30) + self.wait(json_data['waitTime']) #: Make the ReCaptcha appear and show it the pyload interface - b = self.load(pyfile.url, post={'checkDownload': "check"}) - self.log_debug(b) #: Expected output: {'success': "showCaptcha"} + json_data = json.loads(self.load(pyfile.url, post={'checkDownload': "check"})) + if json_data['success'] == "showCaptcha": + self.captcha = ReCaptcha(pyfile) - self.captcha = ReCaptcha(pyfile) + response, challenge = self.captcha.challenge(self.RECAPTCHA_KEY) - response, challenge = self.captcha.challenge(self.RECAPTCHA_KEY) + #: Submit the captcha solution + json_data = json.loads(self.load("https://www.bigfile.to/checkReCaptcha.php", + post={'recaptcha_challenge_field' : challenge, + 'recaptcha_response_field' : response, + 'recaptcha_shortencode_field': self.info['pattern']['ID']})) + self.log_debug("json_data", json_data) + if json_data['success'] != 1: + self.retry_captcha() - #: Submit the captcha solution - self.load("http://www.uploadable.ch/checkReCaptcha.php", - post={'recaptcha_challenge_field' : challenge, - 'recaptcha_response_field' : response, - 'recaptcha_shortencode_field': self.info['pattern']['ID']}) - - self.wait(3) #: Get ready for downloading self.load(pyfile.url, post={'downloadLink': "show"}) - self.wait(3) - #: Download the file self.download(pyfile.url, post={'download': "normal"}, disposition=True) @@ -75,4 +75,4 @@ class UploadableCh(SimpleHoster): self.wait(60 * 60, True) self.retry() - return super(UploadableCh, self).check_download() + return super(BigfileTo, self).check_download() diff --git a/module/plugins/hoster/OboomCom.py b/module/plugins/hoster/OboomCom.py index ef2cdbf29..eee53c10d 100644 --- a/module/plugins/hoster/OboomCom.py +++ b/module/plugins/hoster/OboomCom.py @@ -13,7 +13,7 @@ from module.plugins.captcha.ReCaptcha import ReCaptcha class OboomCom(Hoster): __name__ = "OboomCom" __type__ = "hoster" - __version__ = "0.43" + __version__ = "0.44" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?oboom\.com/(?:#(?:id=|/)?)?(?P<ID>\w{8})' @@ -89,8 +89,7 @@ class OboomCom(Hoster): self.captcha.correct() self.wait(30) - else: - if result[0] == 403: + elif result[0] == 403: if result[1] == -1: #: Another download is running self.set_wait(15 * 60) else: @@ -100,10 +99,11 @@ class OboomCom(Hoster): self.wait() self.retry(5) - elif result[0] == 400 and result[1] == "forbidden": - self.retry(5, 15 * 60, _("Service unavailable")) + elif result[0] == 400 and result[1] == "forbidden": + self.retry(5, 15 * 60, _("Service unavailable")) - self.retry_captcha() + else: + self.retry_captcha() def get_fileInfo(self, token, fileId): diff --git a/module/plugins/hoster/UlozTo.py b/module/plugins/hoster/UlozTo.py index 478758492..0d3739a0a 100644 --- a/module/plugins/hoster/UlozTo.py +++ b/module/plugins/hoster/UlozTo.py @@ -14,7 +14,7 @@ def convert_decimal_prefix(m): class UlozTo(SimpleHoster): __name__ = "UlozTo" __type__ = "hoster" - __version__ = "1.33" + __version__ = "1.34" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?(uloz\.to|ulozto\.(cz|sk|net)|bagruj\.cz|zachowajto\.pl|pornfile\.cz)/(?:live/)?(?P<ID>\w+/[^/?]*)' @@ -38,7 +38,9 @@ class UlozTo(SimpleHoster): OFFLINE_PATTERN = r'<title>404 - Page not found</title>|<h1 class="h1">File (has been deleted|was banned)</h1>' URL_REPLACEMENTS = [(r'(?<=http://)([^/]+)', "www.ulozto.net"), - ("http://", "https://")] + ("http://", "https://"), + (r'(uloz\.to|ulozto\.(cz|sk|net)|bagruj\.cz|zachowajto\.pl|pornfile\.cz)', "ulozto.net")] + SIZE_REPLACEMENTS = [(r'([\d.]+)\s([kMG])B', convert_decimal_prefix)] CHECK_TRAFFIC = True @@ -152,7 +154,7 @@ class UlozTo(SimpleHoster): 'wrong_captcha': ">An error ocurred while verifying the user", 'offline' : re.compile(self.OFFLINE_PATTERN), 'passwd' : self.PASSWD_PATTERN, - 'server_error' : 'src="https://img.ulozto.cz/error403/vykricnik.jpg"', #: Paralell dl, server overload etc. + 'server_error' : "<h1>Z Tvého počítače se již stahuje", #: Paralell dl, server overload etc. 'not_found' : "<title>Ulož.to</title>" }) diff --git a/module/plugins/hoster/UptoboxCom.py b/module/plugins/hoster/UptoboxCom.py index 4783adf8a..1c57f091c 100644 --- a/module/plugins/hoster/UptoboxCom.py +++ b/module/plugins/hoster/UptoboxCom.py @@ -6,7 +6,7 @@ from module.plugins.internal.XFSHoster import XFSHoster class UptoboxCom(XFSHoster): __name__ = "UptoboxCom" __type__ = "hoster" - __version__ = "0.26" + __version__ = "0.27" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?(uptobox|uptostream)\.com/\w{12}' @@ -27,7 +27,7 @@ class UptoboxCom(XFSHoster): OFFLINE_PATTERN = r'>(File not found|Access Denied|404 Not Found)' TEMP_OFFLINE_PATTERN = r'>Service Unavailable' - LINK_PATTERN = r'"(https?://\w+\.uptobox\.com/d/.*?)"' + LINK_PATTERN = r'"(https?://(?:obwp\d+\.uptobox\.com|\w+\.uptobox\.com/d)/.*?)"' DL_LIMIT_PATTERN = r'>You have to wait (.+) to launch a new download<' diff --git a/module/plugins/internal/SimpleCrypter.py b/module/plugins/internal/SimpleCrypter.py index 88a999d5e..6372cba7f 100644 --- a/module/plugins/internal/SimpleCrypter.py +++ b/module/plugins/internal/SimpleCrypter.py @@ -11,7 +11,7 @@ from module.plugins.internal.misc import parse_name, replace_patterns class SimpleCrypter(Crypter): __name__ = "SimpleCrypter" __type__ = "crypter" - __version__ = "0.84" + __version__ = "0.85" __status__ = "testing" __pattern__ = r'^unmatchable$' @@ -207,7 +207,8 @@ class SimpleCrypter(Crypter): self._preload() self.check_errors() - self.links.extend(self.get_links()) + links = self.get_links() + self.links.extend(links) if self.PAGES_PATTERN: self.handle_pages(pyfile) @@ -249,7 +250,10 @@ class SimpleCrypter(Crypter): self.log_info(_("Decrypting as free link...")) self.handle_free(self.pyfile) - return self.links + links = self.links + self.links = [] + + return links def load_page(self, number): |