From c1764e2fea0bb05164c83a876e8cd58b97f58f25 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 16 Jun 2015 17:31:38 +0200 Subject: Update all --- module/plugins/hoster/QuickshareCz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/QuickshareCz.py') diff --git a/module/plugins/hoster/QuickshareCz.py b/module/plugins/hoster/QuickshareCz.py index 1e0750b88..8cfb72c9a 100644 --- a/module/plugins/hoster/QuickshareCz.py +++ b/module/plugins/hoster/QuickshareCz.py @@ -25,7 +25,7 @@ class QuickshareCz(SimpleHoster): def process(self, pyfile): - self.html = self.load(pyfile.url, decode=True) + self.html = self.load(pyfile.url) self.getFileInfo() # parse js variables -- cgit v1.2.3 From 20b6a2ec022202b0efb6cb69415239fb8f4d1445 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 17 Jun 2015 18:59:20 +0200 Subject: Spare code cosmetics (2) --- module/plugins/hoster/QuickshareCz.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/QuickshareCz.py') diff --git a/module/plugins/hoster/QuickshareCz.py b/module/plugins/hoster/QuickshareCz.py index 8cfb72c9a..26bb1e2df 100644 --- a/module/plugins/hoster/QuickshareCz.py +++ b/module/plugins/hoster/QuickshareCz.py @@ -28,12 +28,12 @@ class QuickshareCz(SimpleHoster): self.html = self.load(pyfile.url) self.getFileInfo() - # parse js variables + #: parse js variables self.jsvars = dict((x, y.strip("'")) for x, y in re.findall(r"var (\w+) = ([\d.]+|'.+?')", self.html)) self.logDebug(self.jsvars) pyfile.name = self.jsvars['ID3'] - # determine download type - free or premium + #: determine download type - free or premium if self.premium: if 'UU_prihlasen' in self.jsvars: if self.jsvars['UU_prihlasen'] == '0': @@ -54,7 +54,7 @@ class QuickshareCz(SimpleHoster): def handleFree(self, pyfile): - # get download url + #: get download url download_url = '%s/download.php' % self.jsvars['server'] data = dict((x, self.jsvars[x]) for x in self.jsvars if x in ("ID1", "ID2", "ID3", "ID4")) self.logDebug("FREE URL1:" + download_url, data) @@ -71,7 +71,7 @@ class QuickshareCz(SimpleHoster): self.link = m.group(1).rstrip() #@TODO: Remove .rstrip() in 0.4.10 self.logDebug("FREE URL2:" + self.link) - # check errors + #: check errors m = re.search(r'/chyba/(\d+)', self.link) if m: if m.group(1) == '1': -- cgit v1.2.3 From b1759bc440cd6013837697eb8de540914f693ffd Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 7 Jul 2015 01:23:55 +0200 Subject: No camelCase style anymore --- module/plugins/hoster/QuickshareCz.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'module/plugins/hoster/QuickshareCz.py') diff --git a/module/plugins/hoster/QuickshareCz.py b/module/plugins/hoster/QuickshareCz.py index 26bb1e2df..e9cfdb085 100644 --- a/module/plugins/hoster/QuickshareCz.py +++ b/module/plugins/hoster/QuickshareCz.py @@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class QuickshareCz(SimpleHoster): __name__ = "QuickshareCz" __type__ = "hoster" - __version__ = "0.56" + __version__ = "0.57" __pattern__ = r'http://(?:[^/]*\.)?quickshare\.cz/stahnout-soubor/.+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -30,34 +30,34 @@ class QuickshareCz(SimpleHoster): #: parse js variables self.jsvars = dict((x, y.strip("'")) for x, y in re.findall(r"var (\w+) = ([\d.]+|'.+?')", self.html)) - self.logDebug(self.jsvars) + self.log_debug(self.jsvars) pyfile.name = self.jsvars['ID3'] #: determine download type - free or premium if self.premium: if 'UU_prihlasen' in self.jsvars: if self.jsvars['UU_prihlasen'] == '0': - self.logWarning(_("User not logged in")) + self.log_warning(_("User not logged in")) self.relogin(self.user) self.retry() elif float(self.jsvars['UU_kredit']) < float(self.jsvars['kredit_odecet']): - self.logWarning(_("Not enough credit left")) + self.log_warning(_("Not enough credit left")) self.premium = False if self.premium: - self.handlePremium(pyfile) + self.handle_premium(pyfile) else: - self.handleFree(pyfile) + self.handle_free(pyfile) - if self.checkDownload({"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")) - def handleFree(self, pyfile): + def handle_free(self, pyfile): #: get download url download_url = '%s/download.php' % self.jsvars['server'] data = dict((x, self.jsvars[x]) for x in self.jsvars if x in ("ID1", "ID2", "ID3", "ID4")) - self.logDebug("FREE URL1:" + download_url, data) + self.log_debug("FREE URL1:" + download_url, data) self.req.http.c.setopt(pycurl.FOLLOWLOCATION, 0) self.load(download_url, post=data) @@ -69,7 +69,7 @@ class QuickshareCz(SimpleHoster): self.fail(_("File not found")) self.link = m.group(1).rstrip() #@TODO: Remove .rstrip() in 0.4.10 - self.logDebug("FREE URL2:" + self.link) + self.log_debug("FREE URL2:" + self.link) #: check errors m = re.search(r'/chyba/(\d+)', self.link) @@ -82,7 +82,7 @@ class QuickshareCz(SimpleHoster): self.fail(_("Error %d") % m.group(1)) - def handlePremium(self, pyfile): + def handle_premium(self, pyfile): download_url = '%s/download_premium.php' % self.jsvars['server'] data = dict((x, self.jsvars[x]) for x in self.jsvars if x in ("ID1", "ID2", "ID4", "ID5")) self.download(download_url, get=data) -- cgit v1.2.3 From dad722ac7255640e7e0541c4094a4d2e4de79cd3 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Jul 2015 00:05:58 +0200 Subject: Code cosmetics (2) --- module/plugins/hoster/QuickshareCz.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/QuickshareCz.py') diff --git a/module/plugins/hoster/QuickshareCz.py b/module/plugins/hoster/QuickshareCz.py index e9cfdb085..2d36f45a9 100644 --- a/module/plugins/hoster/QuickshareCz.py +++ b/module/plugins/hoster/QuickshareCz.py @@ -28,12 +28,12 @@ class QuickshareCz(SimpleHoster): self.html = self.load(pyfile.url) self.getFileInfo() - #: parse js variables + #: Parse js variables self.jsvars = dict((x, y.strip("'")) for x, y in re.findall(r"var (\w+) = ([\d.]+|'.+?')", self.html)) self.log_debug(self.jsvars) pyfile.name = self.jsvars['ID3'] - #: determine download type - free or premium + #: Determine download type - free or premium if self.premium: if 'UU_prihlasen' in self.jsvars: if self.jsvars['UU_prihlasen'] == '0': @@ -54,7 +54,7 @@ class QuickshareCz(SimpleHoster): def handle_free(self, pyfile): - #: get download url + #: Get download url download_url = '%s/download.php' % self.jsvars['server'] data = dict((x, self.jsvars[x]) for x in self.jsvars if x in ("ID1", "ID2", "ID3", "ID4")) self.log_debug("FREE URL1:" + download_url, data) @@ -71,7 +71,7 @@ class QuickshareCz(SimpleHoster): self.link = m.group(1).rstrip() #@TODO: Remove .rstrip() in 0.4.10 self.log_debug("FREE URL2:" + self.link) - #: check errors + #: Check errors m = re.search(r'/chyba/(\d+)', self.link) if m: if m.group(1) == '1': -- cgit v1.2.3 From ff9383bfe06d14d23bc0ed6af79aa8967965d078 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Jul 2015 10:59:52 +0200 Subject: Code cosmetics (3) --- module/plugins/hoster/QuickshareCz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/QuickshareCz.py') 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")) -- cgit v1.2.3 From 56389e28ba5d2f5658278bc7f486d73be747f135 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Jul 2015 11:44:49 +0200 Subject: Rename self.core to self.pyload (plugins only) --- module/plugins/hoster/QuickshareCz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/QuickshareCz.py') diff --git a/module/plugins/hoster/QuickshareCz.py b/module/plugins/hoster/QuickshareCz.py index 3af8c42de..444ec6fab 100644 --- a/module/plugins/hoster/QuickshareCz.py +++ b/module/plugins/hoster/QuickshareCz.py @@ -26,7 +26,7 @@ class QuickshareCz(SimpleHoster): def process(self, pyfile): self.html = self.load(pyfile.url) - self.getFileInfo() + self.get_fileInfo() #: Parse js variables self.jsvars = dict((x, y.strip("'")) for x, y in re.findall(r"var (\w+) = ([\d.]+|'.+?')", self.html)) -- cgit v1.2.3 From d38e830b7c0b3c6561a0072c74bbccb5fcdf4a61 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Jul 2015 14:43:42 +0200 Subject: New __status__ magic key --- module/plugins/hoster/QuickshareCz.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hoster/QuickshareCz.py') diff --git a/module/plugins/hoster/QuickshareCz.py b/module/plugins/hoster/QuickshareCz.py index 444ec6fab..f40e10be2 100644 --- a/module/plugins/hoster/QuickshareCz.py +++ b/module/plugins/hoster/QuickshareCz.py @@ -10,6 +10,7 @@ class QuickshareCz(SimpleHoster): __name__ = "QuickshareCz" __type__ = "hoster" __version__ = "0.57" + __status__ = "stable" __pattern__ = r'http://(?:[^/]*\.)?quickshare\.cz/stahnout-soubor/.+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] -- cgit v1.2.3 From 94d017cd2a5c1f194960827a8c7e46afc3682008 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 24 Jul 2015 06:55:49 +0200 Subject: Hotfixes (2) --- module/plugins/hoster/QuickshareCz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/QuickshareCz.py') diff --git a/module/plugins/hoster/QuickshareCz.py b/module/plugins/hoster/QuickshareCz.py index f40e10be2..cb3d34027 100644 --- a/module/plugins/hoster/QuickshareCz.py +++ b/module/plugins/hoster/QuickshareCz.py @@ -10,7 +10,7 @@ class QuickshareCz(SimpleHoster): __name__ = "QuickshareCz" __type__ = "hoster" __version__ = "0.57" - __status__ = "stable" + __status__ = "testing" __pattern__ = r'http://(?:[^/]*\.)?quickshare\.cz/stahnout-soubor/.+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] -- cgit v1.2.3 From 761ca5c66e07559925ebbdbc6531f9ca658b12ce Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 24 Jul 2015 16:11:58 +0200 Subject: Code cosmetics --- module/plugins/hoster/QuickshareCz.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/QuickshareCz.py') diff --git a/module/plugins/hoster/QuickshareCz.py b/module/plugins/hoster/QuickshareCz.py index cb3d34027..4311a82aa 100644 --- a/module/plugins/hoster/QuickshareCz.py +++ b/module/plugins/hoster/QuickshareCz.py @@ -37,7 +37,7 @@ class QuickshareCz(SimpleHoster): #: Determine download type - free or premium if self.premium: if 'UU_prihlasen' in self.jsvars: - if self.jsvars['UU_prihlasen'] == '0': + if self.jsvars['UU_prihlasen'] == "0": self.log_warning(_("User not logged in")) self.relogin(self.user) self.retry() @@ -75,9 +75,9 @@ class QuickshareCz(SimpleHoster): #: Check errors m = re.search(r'/chyba/(\d+)', self.link) if m: - if m.group(1) == '1': + if m.group(1) == "1": self.retry(60, 2 * 60, "This IP is already downloading") - elif m.group(1) == '2': + elif m.group(1) == "2": self.retry(60, 60, "No free slots available") else: self.fail(_("Error %d") % m.group(1)) -- cgit v1.2.3