diff options
Diffstat (limited to 'module/plugins/hoster')
35 files changed, 102 insertions, 102 deletions
diff --git a/module/plugins/hoster/BitshareCom.py b/module/plugins/hoster/BitshareCom.py index d312cf277..13fa6fbec 100644 --- a/module/plugins/hoster/BitshareCom.py +++ b/module/plugins/hoster/BitshareCom.py @@ -74,7 +74,7 @@ class BitshareCom(SimpleHoster): #: This may either download our file or forward us to an error page self.link = self.get_download_url() - if self.check_download({"error": ">Error occured<"}): + if self.check_download({'error': ">Error occured<"}): self.retry(5, 5 * 60, "Bitshare host : Error occured") @@ -88,7 +88,7 @@ class BitshareCom(SimpleHoster): #: Get download info self.log_debug("Getting download info") res = self.load("http://bitshare.com/files-ajax/" + self.file_id + "/request.html", - post={"request": "generateID", "ajaxid": self.ajaxid}) + post={'request': "generateID", 'ajaxid': self.ajaxid}) self.handle_errors(res, ':') @@ -117,17 +117,17 @@ class BitshareCom(SimpleHoster): for i in xrange(3): response, challenge = recaptcha.challenge() res = self.load("http://bitshare.com/files-ajax/" + self.file_id + "/request.html", - post={"request" : "validateCaptcha", - "ajaxid" : self.ajaxid, - "recaptcha_challenge_field": challenge, - "recaptcha_response_field" : response}) + post={'request' : "validateCaptcha", + 'ajaxid' : self.ajaxid, + 'recaptcha_challenge_field': challenge, + 'recaptcha_response_field' : response}) if self.handle_captcha_errors(res): break #: Get download URL self.log_debug("Getting download url") res = self.load("http://bitshare.com/files-ajax/" + self.file_id + "/request.html", - post={"request": "getDownloadURL", "ajaxid": self.ajaxid}) + post={'request': "getDownloadURL", 'ajaxid': self.ajaxid}) self.handle_errors(res, '#') diff --git a/module/plugins/hoster/CrockoCom.py b/module/plugins/hoster/CrockoCom.py index 5250af2c3..590dc1b38 100644 --- a/module/plugins/hoster/CrockoCom.py +++ b/module/plugins/hoster/CrockoCom.py @@ -57,7 +57,7 @@ class CrockoCom(SimpleHoster): inputs['recaptcha_response_field'], inputs['recaptcha_challenge_field'] = recaptcha.challenge() self.download(action, post=inputs) - if self.check_download({"captcha": recaptcha.KEY_AJAX_PATTERN}): + if self.check_download({'captcha': recaptcha.KEY_AJAX_PATTERN}): self.invalid_captcha() else: break diff --git a/module/plugins/hoster/CzshareCom.py b/module/plugins/hoster/CzshareCom.py index 49857ed84..4a20c5f8e 100644 --- a/module/plugins/hoster/CzshareCom.py +++ b/module/plugins/hoster/CzshareCom.py @@ -138,9 +138,9 @@ class CzshareCom(SimpleHoster): #: Check download check = self.check_download({ "temp offline" : re.compile(r"^Soubor je do.*asn.* nedostupn.*$"), - "credit" : re.compile(r"^Nem.*te dostate.*n.* kredit.$"), + 'credit' : re.compile(r"^Nem.*te dostate.*n.* kredit.$"), "multi-dl" : re.compile(self.MULTIDL_PATTERN), - "captcha" : "<li>Zadaný ověřovací kód nesouhlasí!</li>" + 'captcha' : "<li>Zadaný ověřovací kód nesouhlasí!</li>" }) if check == "temp offline": diff --git a/module/plugins/hoster/DailymotionCom.py b/module/plugins/hoster/DailymotionCom.py index f549bbd79..925eeb265 100644 --- a/module/plugins/hoster/DailymotionCom.py +++ b/module/plugins/hoster/DailymotionCom.py @@ -12,7 +12,7 @@ def get_info(urls): result = [] regex = re.compile(DailymotionCom.__pattern__) apiurl = "https://api.dailymotion.com/video/%s" - request = {"fields": "access_error,status,title"} + request = {'fields': "access_error,status,title"} for url in urls: id = regex.match(url).group('ID') diff --git a/module/plugins/hoster/DataportCz.py b/module/plugins/hoster/DataportCz.py index d3b25d2ad..2c00a5d55 100644 --- a/module/plugins/hoster/DataportCz.py +++ b/module/plugins/hoster/DataportCz.py @@ -25,7 +25,7 @@ class DataportCz(SimpleHoster): def handle_free(self, pyfile): - captchas = {"1": "jkeG", "2": "hMJQ", "3": "vmEK", "4": "ePQM", "5": "blBd"} + captchas = {'1': "jkeG", '2': "hMJQ", '3': "vmEK", '4': "ePQM", '5': "blBd"} for _i in xrange(60): action, inputs = self.parse_html_form('free_download_form') @@ -40,8 +40,8 @@ class DataportCz(SimpleHoster): self.download("http://www.dataport.cz%s" % action, post=inputs) - check = self.check_download({"captcha": 'alert("\u0160patn\u011b opsan\u00fd k\u00f3d z obr\u00e1zu");', - "slot" : 'alert("Je n\u00e1m l\u00edto, ale moment\u00e1ln\u011b nejsou'}) + check = self.check_download({'captcha': 'alert("\u0160patn\u011b opsan\u00fd k\u00f3d z obr\u00e1zu");', + 'slot' : 'alert("Je n\u00e1m l\u00edto, ale moment\u00e1ln\u011b nejsou'}) if check == "captcha": self.error(_("invalid captcha")) diff --git a/module/plugins/hoster/DlFreeFr.py b/module/plugins/hoster/DlFreeFr.py index 7db72b383..ef64bed32 100644 --- a/module/plugins/hoster/DlFreeFr.py +++ b/module/plugins/hoster/DlFreeFr.py @@ -112,7 +112,7 @@ class DlFreeFr(SimpleHoster): def get_last_headers(self): #: Parse header - header = {"code": self.req.code} + header = {'code': self.req.code} for line in self.req.http.header.splitlines(): line = line.strip() if not line or ":" not in line: diff --git a/module/plugins/hoster/EdiskCz.py b/module/plugins/hoster/EdiskCz.py index 100c6d269..c29231a7b 100644 --- a/module/plugins/hoster/EdiskCz.py +++ b/module/plugins/hoster/EdiskCz.py @@ -45,7 +45,7 @@ class EdiskCz(SimpleHoster): self.html = self.load(re.sub("/en/download/", "/en/download-slow/", url)) url = self.load(re.sub("/en/download/", "/x-download/", url), post={ - "action": action + 'action': action }) if not re.match(self.LINK_FREE_PATTERN, url): diff --git a/module/plugins/hoster/EuroshareEu.py b/module/plugins/hoster/EuroshareEu.py index 4401391a9..b17322e6a 100644 --- a/module/plugins/hoster/EuroshareEu.py +++ b/module/plugins/hoster/EuroshareEu.py @@ -36,8 +36,8 @@ class EuroshareEu(SimpleHoster): self.link = pyfile.url.rstrip('/') + "/download/" - check = self.check_download({"login": re.compile(self.ERROR_PATTERN), - "json" : re.compile(r'\{"status":"error".*?"message":"(.*?)"')}) + check = self.check_download({'login': re.compile(self.ERROR_PATTERN), + 'json' : re.compile(r'\{"status":"error".*?"message":"(.*?)"')}) if check == "login" or (check == "json" and self.last_check.group(1) == "Access token expired"): self.account.relogin(self.user) diff --git a/module/plugins/hoster/ExtabitCom.py b/module/plugins/hoster/ExtabitCom.py index c2ae32099..5e282c7ac 100644 --- a/module/plugins/hoster/ExtabitCom.py +++ b/module/plugins/hoster/ExtabitCom.py @@ -50,7 +50,7 @@ class ExtabitCom(SimpleHoster): captcha_key = m.group(1) for _i in xrange(5): - get_data = {"type": "recaptcha"} + get_data = {'type': "recaptcha"} get_data['capture'], get_data['challenge'] = recaptcha.challenge(captcha_key) res = json_loads(self.load("http://extabit.com/file/%s/" % fileID, get=get_data)) if "ok" in res: diff --git a/module/plugins/hoster/FilecloudIo.py b/module/plugins/hoster/FilecloudIo.py index f92d82269..2e5843d37 100644 --- a/module/plugins/hoster/FilecloudIo.py +++ b/module/plugins/hoster/FilecloudIo.py @@ -45,7 +45,7 @@ class FilecloudIo(SimpleHoster): def handle_free(self, pyfile): - data = {"ukey": self.info['pattern']['ID']} + data = {'ukey': self.info['pattern']['ID']} m = re.search(self.AB1_PATTERN, self.html) if m is None: @@ -61,8 +61,8 @@ class FilecloudIo(SimpleHoster): self.error(_("ReCaptcha key not found")) response, challenge = recaptcha.challenge(captcha_key) - self.account.form_data = {"recaptcha_challenge_field": challenge, - "recaptcha_response_field" : response} + self.account.form_data = {'recaptcha_challenge_field': challenge, + 'recaptcha_response_field' : response} self.account.relogin(self.user) self.retry(2) @@ -102,7 +102,7 @@ class FilecloudIo(SimpleHoster): self.error(_("LINK_FREE_PATTERN not found")) if "size" in self.info and self.info['size']: - self.check_data = {"size": int(self.info['size'])} + self.check_data = {'size': int(self.info['size'])} self.link = m.group(1) else: @@ -114,7 +114,7 @@ class FilecloudIo(SimpleHoster): ukey = self.info['pattern']['ID'] self.log_debug("Akey: %s | Ukey: %s" % (akey, ukey)) rep = self.load("http://api.filecloud.io/api-fetch_download_url.api", - post={"akey": akey, "ukey": ukey}) + post={'akey': akey, 'ukey': ukey}) self.log_debug("FetchDownloadUrl: " + rep) rep = json_loads(rep) if rep['status'] == 'ok': diff --git a/module/plugins/hoster/FilepostCom.py b/module/plugins/hoster/FilepostCom.py index 3731fad43..2ed75e7e4 100644 --- a/module/plugins/hoster/FilepostCom.py +++ b/module/plugins/hoster/FilepostCom.py @@ -48,7 +48,7 @@ class FilepostCom(SimpleHoster): if wait_time > 0: self.wait(wait_time) - post_dict = {"token": flp_token, "code": self.info['pattern']['ID'], "file_pass": ''} + post_dict = {'token': flp_token, 'code': self.info['pattern']['ID'], 'file_pass': ''} if 'var is_pass_exists = true;' in self.html: #: Solve password diff --git a/module/plugins/hoster/FilesMailRu.py b/module/plugins/hoster/FilesMailRu.py index dfd4372a5..76462d321 100644 --- a/module/plugins/hoster/FilesMailRu.py +++ b/module/plugins/hoster/FilesMailRu.py @@ -102,7 +102,7 @@ class FilesMailRu(Hoster): #: so i set it to check every download because sometimes there are downloads #: that contain the HTML-Text and 60MB ZEROs after that in a xyzfile.part1.rar file #: (Loading 100MB in to ram is not an option) - check = self.check_download({"html": "<meta name="}, read_size=50000) + check = self.check_download({'html': "<meta name="}, read_size=50000) if check == "html": self.log_info(_( "There was HTML Code in the Downloaded File (%s)...redirect error? The Download will be restarted." % diff --git a/module/plugins/hoster/FileserveCom.py b/module/plugins/hoster/FileserveCom.py index fd50bd265..0b6b693b1 100644 --- a/module/plugins/hoster/FileserveCom.py +++ b/module/plugins/hoster/FileserveCom.py @@ -12,7 +12,7 @@ from module.utils import parseFileSize as parse_size def check_file(plugin, urls): - html = get_url(plugin.URLS[1], post={"urls": "\n".join(urls)}) + html = get_url(plugin.URLS[1], post={'urls': "\n".join(urls)}) file_info = [] for li in re.finditer(plugin.LINKCHECK_TR, html, re.S): @@ -81,13 +81,13 @@ class FileserveCom(Hoster): def handle_free(self): self.html = self.load(self.url) - action = self.load(self.url, post={"checkDownload": "check"}) + action = self.load(self.url, post={'checkDownload': "check"}) action = json_loads(action) self.log_debug(action) if "fail" in action: if action['fail'] == "timeLimit": - self.html = self.load(self.url, post={"checkDownload": "showError", "errorType": "timeLimit"}) + self.html = self.load(self.url, post={'checkDownload': "showError", 'errorType': "timeLimit"}) self.do_long_wait(re.search(self.LONG_WAIT_PATTERN, self.html)) @@ -109,18 +109,18 @@ class FileserveCom(Hoster): self.error(_("Unknown server response")) #: Show download link - res = self.load(self.url, post={"downloadLink": "show"}) + res = self.load(self.url, post={'downloadLink': "show"}) self.log_debug("Show downloadLink response: %s" % res) if "fail" in res: self.error(_("Couldn't retrieve download url")) #: This may either download our file or forward us to an error page - self.download(self.url, post={"download": "normal"}) + self.download(self.url, post={'download': "normal"}) self.log_debug(self.req.http.lastEffectiveURL) - check = self.check_download({"expired": self.LINK_EXPIRED_PATTERN, - "wait" : re.compile(self.LONG_WAIT_PATTERN), - "limit" : self.DL_LIMIT_PATTERN}) + check = self.check_download({'expired': self.LINK_EXPIRED_PATTERN, + 'wait' : re.compile(self.LONG_WAIT_PATTERN), + 'limit' : self.DL_LIMIT_PATTERN}) if check == "expired": self.log_debug("Download link was expired") @@ -138,7 +138,7 @@ class FileserveCom(Hoster): def do_timmer(self): - res = self.load(self.url, post={"downloadLink": "wait"}) + res = self.load(self.url, post={'downloadLink': "wait"}) self.log_debug("Wait response: %s" % res[:80]) if "fail" in res: @@ -185,9 +185,9 @@ class FileserveCom(Hoster): if self.__name__ == "FileserveCom": #: Try api download res = self.load("http://app.fileserve.com/api/download/premium/", - post={"username": self.user, - "password": self.account.get_account_data(self.user)['password'], - "shorten": self.file_id}) + post={'username': self.user, + 'password': self.account.get_account_data(self.user)['password'], + 'shorten': self.file_id}) if res: res = json_loads(res) if res['error_code'] == "302": @@ -203,7 +203,7 @@ class FileserveCom(Hoster): self.download(premium_url or self.pyfile.url) - if not premium_url and self.check_download({"login": re.compile(self.NOT_LOGGED_IN_PATTERN)}): + if not premium_url and self.check_download({'login': re.compile(self.NOT_LOGGED_IN_PATTERN)}): self.account.relogin(self.user) self.retry(reason=_("Not logged in")) diff --git a/module/plugins/hoster/FlyFilesNet.py b/module/plugins/hoster/FlyFilesNet.py index ed46833a5..f756caa9c 100644 --- a/module/plugins/hoster/FlyFilesNet.py +++ b/module/plugins/hoster/FlyFilesNet.py @@ -31,7 +31,7 @@ class FlyFilesNet(SimpleHoster): url = "http://flyfiles.net" #: Get download URL - parsed_url = self.load(url, post={"getDownLink": session}) + parsed_url = self.load(url, post={'getDownLink': session}) self.log_debug("Parsed URL: %s" % parsed_url) if parsed_url == '#downlink|' or parsed_url == "#downlink|#": diff --git a/module/plugins/hoster/FreakshareCom.py b/module/plugins/hoster/FreakshareCom.py index f5092eceb..1a5b179b8 100644 --- a/module/plugins/hoster/FreakshareCom.py +++ b/module/plugins/hoster/FreakshareCom.py @@ -43,11 +43,11 @@ class FreakshareCom(Hoster): self.download(pyfile.url, post=self.req_opts) - check = self.check_download({"bad" : "bad try", - "paralell" : "> Sorry, you cant download more then 1 files at time. <", - "empty" : "Warning: Unknown: Filename cannot be empty", - "wrong_captcha" : "Wrong Captcha!", - "downloadserver": "No Downloadserver. Please try again later!"}) + check = self.check_download({'bad' : "bad try", + 'paralell' : "> Sorry, you cant download more then 1 files at time. <", + 'empty' : "Warning: Unknown: Filename cannot be empty", + 'wrong_captcha' : "Wrong Captcha!", + 'downloadserver': "No Downloadserver. Please try again later!"}) if check == "bad": self.fail(_("Bad Try")) @@ -86,7 +86,7 @@ class FreakshareCom(Hoster): def download_html(self): - self.load("http://freakshare.com/index.php", {"language": "EN"}) #: Set english language in server session + self.load("http://freakshare.com/index.php", {'language': "EN"}) #: Set english language in server session self.html = self.load(self.pyfile.url) diff --git a/module/plugins/hoster/GigapetaCom.py b/module/plugins/hoster/GigapetaCom.py index bfa30358e..78b0416b6 100644 --- a/module/plugins/hoster/GigapetaCom.py +++ b/module/plugins/hoster/GigapetaCom.py @@ -40,9 +40,9 @@ class GigapetaCom(SimpleHoster): captcha = self.decrypt_captcha(captcha_url) self.html = self.load(pyfile.url, post={ - "captcha_key": captcha_key, - "captcha": captcha, - "download": "Download"}) + 'captcha_key': captcha_key, + 'captcha': captcha, + 'download': "Download"}) m = re.search(r'Location\s*:\s*(.+)', self.req.http.header, re.I) if m: diff --git a/module/plugins/hoster/JumbofilesCom.py b/module/plugins/hoster/JumbofilesCom.py index 1da6d7d3c..ea3d4b161 100644 --- a/module/plugins/hoster/JumbofilesCom.py +++ b/module/plugins/hoster/JumbofilesCom.py @@ -29,7 +29,7 @@ class JumbofilesCom(SimpleHoster): def handle_free(self, pyfile): - post_data = {"id": self.info['pattern']['ID'], "op": "download3", "rand": ""} + post_data = {'id': self.info['pattern']['ID'], 'op': "download3", 'rand': ""} html = self.load(self.pyfile.url, post=post_data) self.link = re.search(self.LINK_FREE_PATTERN, html).group(1) diff --git a/module/plugins/hoster/LetitbitNet.py b/module/plugins/hoster/LetitbitNet.py index 061311bab..8e912bcb8 100644 --- a/module/plugins/hoster/LetitbitNet.py +++ b/module/plugins/hoster/LetitbitNet.py @@ -16,7 +16,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, seconds_to_midnig def api_response(url): - json_data = ["yw7XQy2v9", ["download/info", {"link": url}]] + json_data = ["yw7XQy2v9", ["download/info", {'link': url}]] api_rep = get_url("http://api.letitbit.net/json", post={'r': json_dumps(json_data)}) return json_loads(api_rep) @@ -88,9 +88,9 @@ class LetitbitNet(SimpleHoster): recaptcha = ReCaptcha(self) response, challenge = recaptcha.challenge() - post_data = {"recaptcha_challenge_field": challenge, - "recaptcha_response_field": response, - "recaptcha_control_field": recaptcha_control_field} + post_data = {'recaptcha_challenge_field': challenge, + 'recaptcha_response_field': response, + 'recaptcha_control_field': recaptcha_control_field} self.log_debug("Post data to send", post_data) @@ -125,7 +125,7 @@ class LetitbitNet(SimpleHoster): api_key = self.user premium_key = self.account.get_account_data(self.user)['password'] - json_data = [api_key, ["download/direct_links", {"pass": premium_key, "link": pyfile.url}]] + json_data = [api_key, ["download/direct_links", {'pass': premium_key, 'link': pyfile.url}]] api_rep = self.load('http://api.letitbit.net/json', post={'r': json_dumps(json_data)}) self.log_debug("API Data: " + api_rep) api_rep = json_loads(api_rep) diff --git a/module/plugins/hoster/MegaCoNz.py b/module/plugins/hoster/MegaCoNz.py index 9a2726448..66cceda5f 100644 --- a/module/plugins/hoster/MegaCoNz.py +++ b/module/plugins/hoster/MegaCoNz.py @@ -190,7 +190,7 @@ class MegaCoNz(Hoster): pattern = re.match(self.__pattern__, pyfile.url).groupdict() id = pattern['ID'] key = pattern['KEY'] - public = pattern['TYPE'] == '' + public = pattern['TYPE'] == "" self.log_debug("ID: %s" % id, "Key: %s" % key, "Type: %s" % ("public" if public else "node")) diff --git a/module/plugins/hoster/MultishareCz.py b/module/plugins/hoster/MultishareCz.py index 1f6ed4334..09bcd8200 100644 --- a/module/plugins/hoster/MultishareCz.py +++ b/module/plugins/hoster/MultishareCz.py @@ -37,7 +37,7 @@ class MultishareCz(SimpleHoster): def handle_multi(self, pyfile): - self.html = self.load('http://www.multishare.cz/html/mms_ajax.php', post={"link": pyfile.url}) + self.html = self.load('http://www.multishare.cz/html/mms_ajax.php', post={'link': pyfile.url}) self.check_info() diff --git a/module/plugins/hoster/NarodRu.py b/module/plugins/hoster/NarodRu.py index 3c3b0d124..53171c837 100644 --- a/module/plugins/hoster/NarodRu.py +++ b/module/plugins/hoster/NarodRu.py @@ -40,7 +40,7 @@ class NarodRu(SimpleHoster): if m is None: self.error(_("Captcha")) - post_data = {"action": "sendcapcha"} + post_data = {'action': "sendcapcha"} captcha_url, post_data['key'] = m.groups() post_data['rep'] = self.decrypt_captcha(captcha_url) diff --git a/module/plugins/hoster/OboomCom.py b/module/plugins/hoster/OboomCom.py index 307f34d66..3756ef81f 100644 --- a/module/plugins/hoster/OboomCom.py +++ b/module/plugins/hoster/OboomCom.py @@ -42,7 +42,7 @@ class OboomCom(Hoster): if not self.premium: self.solve_captcha() self.get_download_ticket() - self.download("https://%s/1.0/dlh" % self.download_domain, get={"ticket": self.download_ticket, "http_errors": 0}) + self.download("https://%s/1.0/dlh" % self.download_domain, get={'ticket': self.download_ticket, 'http_errors': 0}) def load_url(self, url, get=None): @@ -77,10 +77,10 @@ class OboomCom(Hoster): for _i in xrange(5): response, challenge = recaptcha.challenge(self.RECAPTCHA_KEY) apiUrl = "https://www.oboom.com/1.0/download/ticket" - params = {"recaptcha_challenge_field": challenge, - "recaptcha_response_field": response, - "download_id": self.file_id, - "token": self.session_token} + params = {'recaptcha_challenge_field': challenge, + 'recaptcha_response_field': response, + 'download_id': self.file_id, + 'token': self.session_token} result = self.load_url(apiUrl, params) if result[0] == 200: @@ -112,7 +112,7 @@ class OboomCom(Hoster): def getFileInfo(self, token, fileId): apiUrl = "https://api.oboom.com/1.0/info" - params = {"token": token, "items": fileId, "http_errors": 0} + params = {'token': token, 'items': fileId, 'http_errors': 0} result = self.load_url(apiUrl, params) if result[0] == 200: @@ -128,7 +128,7 @@ class OboomCom(Hoster): def get_download_ticket(self): apiUrl = "https://api.oboom.com/1/dl" - params = {"item": self.file_id, "http_errors": 0} + params = {'item': self.file_id, 'http_errors': 0} if self.premium: params['token'] = self.session_token else: diff --git a/module/plugins/hoster/PremiumTo.py b/module/plugins/hoster/PremiumTo.py index f16fde1e0..34c442443 100644 --- a/module/plugins/hoster/PremiumTo.py +++ b/module/plugins/hoster/PremiumTo.py @@ -40,7 +40,7 @@ class PremiumTo(MultiHoster): if self.check_download({'nopremium': "No premium account available"}): self.retry(60, 5 * 60, "No premium account available") - err = '' + err = "" if self.req.http.code == '420': #: Custom error code send - fail file = fs_encode(self.last_download) diff --git a/module/plugins/hoster/QuickshareCz.py b/module/plugins/hoster/QuickshareCz.py index 2d36f45a9..3af8c42de 100644 --- a/module/plugins/hoster/QuickshareCz.py +++ b/module/plugins/hoster/QuickshareCz.py @@ -49,7 +49,7 @@ class QuickshareCz(SimpleHoster): else: self.handle_free(pyfile) - if self.check_download({"error": re.compile(r"\AChyba!")}, max_size=100): + if self.check_download({'error': re.compile(r"\AChyba!")}, max_size=100): self.fail(_("File not m or plugin defect")) diff --git a/module/plugins/hoster/RPNetBiz.py b/module/plugins/hoster/RPNetBiz.py index b6e54a560..352d3147a 100644 --- a/module/plugins/hoster/RPNetBiz.py +++ b/module/plugins/hoster/RPNetBiz.py @@ -29,10 +29,10 @@ class RPNetBiz(MultiHoster): #: Get the download link res = self.load("https://premium.rpnet.biz/client_api.php", - get={"username": user, - "password": data['password'], - "action" : "generate", - "links" : pyfile.url}) + get={'username': user, + 'password': data['password'], + 'action' : "generate", + 'links' : pyfile.url}) self.log_debug("JSON data: %s" % res) link_status = json_loads(res)['links'][0] #: Get the first link... since we only queried one @@ -48,10 +48,10 @@ class RPNetBiz(MultiHoster): while (my_try <= max_tries): self.log_debug("Try: %d ; Max Tries: %d" % (my_try, max_tries)) res = self.load("https://premium.rpnet.biz/client_api.php", - get={"username": user, - "password": data['password'], - "action": "downloadInformation", - "id": link_status['id']}) + get={'username': user, + 'password': data['password'], + 'action' : "downloadInformation", + 'id' : link_status['id']}) self.log_debug("JSON data hdd query: %s" % res) download_status = json_loads(res)['download'] diff --git a/module/plugins/hoster/SimplydebridCom.py b/module/plugins/hoster/SimplydebridCom.py index 9301f1e93..b0ae534a7 100644 --- a/module/plugins/hoster/SimplydebridCom.py +++ b/module/plugins/hoster/SimplydebridCom.py @@ -41,7 +41,7 @@ class SimplydebridCom(MultiHoster): def check_file(self): - if self.check_download({"error": "No address associated with hostname"}): + if self.check_download({'error': "No address associated with hostname"}): self.retry(24, 3 * 60, _("Bad file downloaded")) return super(SimplydebridCom, self).checkFile() diff --git a/module/plugins/hoster/UlozTo.py b/module/plugins/hoster/UlozTo.py index 3841a78fe..48d7fbcd2 100644 --- a/module/plugins/hoster/UlozTo.py +++ b/module/plugins/hoster/UlozTo.py @@ -97,7 +97,7 @@ class UlozTo(SimpleHoster): self.html = self.load(pyfile.url, get={'do': "askAgeForm-submit"}, - post={"agree": "Confirm", "_token_": m.group(1)}) + post={'agree': "Confirm", '_token_': m.group(1)}) if self.PASSWD_PATTERN in self.html: password = self.get_password() @@ -106,7 +106,7 @@ class UlozTo(SimpleHoster): self.log_info(_("Password protected link, trying ") + password) self.html = self.load(pyfile.url, get={'do': "passwordProtectedForm-submit"}, - post={"password": password, "password_send": 'Send'}) + post={'password': password, 'password_send': 'Send'}) if self.PASSWD_PATTERN in self.html: self.fail(_("Incorrect password")) @@ -121,11 +121,11 @@ class UlozTo(SimpleHoster): def check_file(self): check = self.check_download({ - "wrong_captcha": re.compile(r'<ul class="error">\s*<li>Error rewriting the text.</li>'), - "offline" : re.compile(self.OFFLINE_PATTERN), - "passwd" : self.PASSWD_PATTERN, - "server_error" : 'src="http://img.ulozto.cz/error403/vykricnik.jpg"', #: Paralell dl, server overload etc. - "not_found" : "<title>Ulož.to</title>" + 'wrong_captcha': re.compile(r'<ul class="error">\s*<li>Error rewriting the text.</li>'), + 'offline' : re.compile(self.OFFLINE_PATTERN), + 'passwd' : self.PASSWD_PATTERN, + 'server_error' : 'src="http://img.ulozto.cz/error403/vykricnik.jpg"', #: Paralell dl, server overload etc. + 'not_found' : "<title>Ulož.to</title>" }) if check == "wrong_captcha": diff --git a/module/plugins/hoster/UloziskoSk.py b/module/plugins/hoster/UloziskoSk.py index c49db225b..ad6283433 100644 --- a/module/plugins/hoster/UloziskoSk.py +++ b/module/plugins/hoster/UloziskoSk.py @@ -63,10 +63,10 @@ class UloziskoSk(SimpleHoster): self.log_debug("CAPTCHA_URL:" + captcha_url + ' CAPTCHA:' + captcha) self.download(parsed_url, - post={"antispam": captcha, - "id" : id, - "name" : pyfile.name, - "but" : "++++STIAHNI+S%DABOR++++"}) + post={'antispam': captcha, + 'id' : id, + 'name' : pyfile.name, + 'but' : "++++STIAHNI+S%DABOR++++"}) getInfo = create_getInfo(UloziskoSk) diff --git a/module/plugins/hoster/UploadableCh.py b/module/plugins/hoster/UploadableCh.py index 6f589efa3..fa16aa194 100644 --- a/module/plugins/hoster/UploadableCh.py +++ b/module/plugins/hoster/UploadableCh.py @@ -41,7 +41,7 @@ class UploadableCh(SimpleHoster): #: 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"} + self.log_debug(b) #: Expected output: {'success': "showCaptcha"} recaptcha = ReCaptcha(self) diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py index d04664a8f..be139f354 100644 --- a/module/plugins/hoster/UploadedTo.py +++ b/module/plugins/hoster/UploadedTo.py @@ -45,7 +45,7 @@ class UploadedTo(SimpleHoster): for _i in xrange(5): html = get_url("http://uploaded.net/api/filemultiple", - get={"apikey": cls.API_KEY, 'id_0': re.match(cls.__pattern__, url).group('ID')}) + get={'apikey': cls.API_KEY, 'id_0': re.match(cls.__pattern__, url).group('ID')}) if html != "can't find request": api = html.split(",", 4) diff --git a/module/plugins/hoster/UploadheroCom.py b/module/plugins/hoster/UploadheroCom.py index de83b42fc..e586cbb53 100644 --- a/module/plugins/hoster/UploadheroCom.py +++ b/module/plugins/hoster/UploadheroCom.py @@ -46,7 +46,7 @@ class UploadheroCom(SimpleHoster): captcha = self.decrypt_captcha(urlparse.urljoin("http://uploadhero.co", m.group(1))) self.html = self.load(pyfile.url, - get={"code": captcha}) + get={'code': captcha}) m = re.search(self.LINK_FREE_PATTERN, self.html) if m: diff --git a/module/plugins/hoster/WrzucTo.py b/module/plugins/hoster/WrzucTo.py index 8a32832a0..e73120383 100644 --- a/module/plugins/hoster/WrzucTo.py +++ b/module/plugins/hoster/WrzucTo.py @@ -36,10 +36,10 @@ class WrzucTo(SimpleHoster): self.req.http.c.setopt(pycurl.HTTPHEADER, ["X-Requested-With: XMLHttpRequest"]) self.req.http.lastURL = pyfile.url - self.load("http://www.wrzuc.to/ajax/server/prepair", post={"md5": data['md5']}) + self.load("http://www.wrzuc.to/ajax/server/prepair", post={'md5': data['md5']}) self.req.http.lastURL = pyfile.url - self.html = self.load("http://www.wrzuc.to/ajax/server/download_link", post={"file": data['file']}) + self.html = self.load("http://www.wrzuc.to/ajax/server/download_link", post={'file': data['file']}) data.update(re.findall(r'"(download_link|server_id)":"(.*?)"', self.html)) if len(data) != 4: diff --git a/module/plugins/hoster/Xdcc.py b/module/plugins/hoster/Xdcc.py index 1e3bcc215..4a947da1b 100644 --- a/module/plugins/hoster/Xdcc.py +++ b/module/plugins/hoster/Xdcc.py @@ -143,10 +143,10 @@ class Xdcc(Hoster): continue msg = { - "origin": msg[0][1:], - "action": msg[1], - "target": msg[2], - "text": msg[3][1:] + 'origin': msg[0][1:], + 'action': msg[1], + 'target': msg[2], + 'text': msg[3][1:] } if nick == msg['target'][0:len(nick)] and "PRIVMSG" == msg['action']: @@ -195,7 +195,7 @@ class Xdcc(Hoster): self.pyfile.setStatus("downloading") newname = self.req.download(ip, port, filename, sock, self.pyfile.setProgress) if newname and newname != filename: - self.log_info(_("%(name)s saved as %(newname)s") % {"name": self.pyfile.name, "newname": newname}) + self.log_info(_("%(name)s saved as %(newname)s") % {'name': self.pyfile.name, 'newname': newname}) filename = newname #: kill IRC socket diff --git a/module/plugins/hoster/YoupornCom.py b/module/plugins/hoster/YoupornCom.py index 959ee83a5..af113f658 100644 --- a/module/plugins/hoster/YoupornCom.py +++ b/module/plugins/hoster/YoupornCom.py @@ -29,7 +29,7 @@ class YoupornCom(Hoster): def download_html(self): url = self.pyfile.url - self.html = self.load(url, post={"user_choice": "Enter"}, cookies=False) + self.html = self.load(url, post={'user_choice': "Enter"}, cookies=False) def get_file_url(self): diff --git a/module/plugins/hoster/YoutubeCom.py b/module/plugins/hoster/YoutubeCom.py index 330fe8063..cbd44de21 100644 --- a/module/plugins/hoster/YoutubeCom.py +++ b/module/plugins/hoster/YoutubeCom.py @@ -98,11 +98,11 @@ class YoutubeCom(Hoster): use3d = self.get_config('3d') if use3d: - quality = {"sd": 82, "hd": 84, "fullhd": 85, "240p": 83, "360p": 82, - "480p": 82, "720p": 84, "1080p": 85, "3072p": 85} + quality = {'sd': 82, 'hd': 84, 'fullhd': 85, '240p': 83, '360p': 82, + '480p': 82, '720p': 84, '1080p': 85, '3072p': 85} else: - quality = {"sd": 18, "hd": 22, "fullhd": 37, "240p": 5, "360p": 18, - "480p": 35, "720p": 22, "1080p": 37, "3072p": 38} + quality = {'sd': 18, 'hd': 22, 'fullhd': 37, '240p': 5, '360p': 18, + '480p': 35, '720p': 22, '1080p': 37, '3072p': 38} desired_fmt = self.get_config('fmt') |