diff options
author | ardi69 <armin@diedering.de> | 2015-04-21 06:51:24 +0200 |
---|---|---|
committer | ardi69 <armin@diedering.de> | 2015-04-21 06:51:24 +0200 |
commit | 2f8433b6a10505d29a1b63ea8bbd9b0bf3f7d9f6 (patch) | |
tree | b82a8b5fc0a309f69733b0a004284f4ef45833d8 /pyload/plugin/hoster | |
parent | added check of classname == filename (diff) | |
parent | Merge branch 'pr/n10_ardi69' into 0.4.10 (diff) | |
download | pyload-2f8433b6a10505d29a1b63ea8bbd9b0bf3f7d9f6.tar.xz |
Merge pull request #4 from vuolter/0.4.10
vuolter HEAD
Diffstat (limited to 'pyload/plugin/hoster')
37 files changed, 74 insertions, 74 deletions
diff --git a/pyload/plugin/hoster/BezvadataCz.py b/pyload/plugin/hoster/BezvadataCz.py index 3eab28ae6..fa29c83d5 100644 --- a/pyload/plugin/hoster/BezvadataCz.py +++ b/pyload/plugin/hoster/BezvadataCz.py @@ -29,13 +29,13 @@ class BezvadataCz(SimpleHoster): def handleFree(self, pyfile): - #download button + # download button m = re.search(r'<a class="stahnoutSoubor".*?href="(.*?)"', self.html) if m is None: self.error(_("Page 1 URL not found")) url = "http://bezvadata.cz%s" % m.group(1) - #captcha form + # captcha form self.html = self.load(url) self.checkErrors() for _i in xrange(5): @@ -47,7 +47,7 @@ class BezvadataCz(SimpleHoster): if m is None: self.error(_("Wrong captcha image")) - #captcha image is contained in html page as base64encoded data but decryptCaptcha() expects image url + # captcha image is contained in html page as base64encoded data but decryptCaptcha() expects image url self.load, proper_load = self.loadcaptcha, self.load try: inputs['captcha'] = self.decryptCaptcha(m.group(1), imgtype='png') @@ -62,7 +62,7 @@ class BezvadataCz(SimpleHoster): else: self.fail(_("No valid captcha code entered")) - #download url + # download url self.html = self.load("http://bezvadata.cz%s" % action, post=inputs) self.checkErrors() m = re.search(r'<a class="stahnoutSoubor2" href="(.*?)">', self.html) @@ -71,7 +71,7 @@ class BezvadataCz(SimpleHoster): url = "http://bezvadata.cz%s" % m.group(1) self.logDebug("DL URL %s" % url) - #countdown + # countdown m = re.search(r'id="countdown">(\d\d):(\d\d)<', self.html) wait_time = (int(m.group(1)) * 60 + int(m.group(2))) if m else 120 self.wait(wait_time, False) diff --git a/pyload/plugin/hoster/CzshareCom.py b/pyload/plugin/hoster/CzshareCom.py index da9aa68d5..9926c8d74 100644 --- a/pyload/plugin/hoster/CzshareCom.py +++ b/pyload/plugin/hoster/CzshareCom.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # Test links: -# http://czshare.com/5278880/random.bin +# http://czshare.com/5278880/random.bin import re diff --git a/pyload/plugin/hoster/DataHu.py b/pyload/plugin/hoster/DataHu.py index 1f44e62e5..ba3576d10 100644 --- a/pyload/plugin/hoster/DataHu.py +++ b/pyload/plugin/hoster/DataHu.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # Test links: -# http://data.hu/get/6381232/random.bin +# http://data.hu/get/6381232/random.bin import re diff --git a/pyload/plugin/hoster/DlFreeFr.py b/pyload/plugin/hoster/DlFreeFr.py index 151d0ca9f..684da2b6d 100644 --- a/pyload/plugin/hoster/DlFreeFr.py +++ b/pyload/plugin/hoster/DlFreeFr.py @@ -117,7 +117,7 @@ class DlFreeFr(SimpleHoster): def getLastHeaders(self): - #parse header + # parse header header = {"code": self.req.code} for line in self.req.http.header.splitlines(): line = line.strip() diff --git a/pyload/plugin/hoster/FileomCom.py b/pyload/plugin/hoster/FileomCom.py index bac912c56..b01b34db0 100644 --- a/pyload/plugin/hoster/FileomCom.py +++ b/pyload/plugin/hoster/FileomCom.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # Test links: -# http://fileom.com/gycaytyzdw3g/random.bin.html +# http://fileom.com/gycaytyzdw3g/random.bin.html from pyload.plugin.internal.XFSHoster import XFSHoster diff --git a/pyload/plugin/hoster/FilepupNet.py b/pyload/plugin/hoster/FilepupNet.py index 72237285c..91d640e00 100644 --- a/pyload/plugin/hoster/FilepupNet.py +++ b/pyload/plugin/hoster/FilepupNet.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- # # Test links: -# http://www.filepup.net/files/k5w4ZVoF1410184283.html -# http://www.filepup.net/files/R4GBq9XH1410186553.html +# http://www.filepup.net/files/k5w4ZVoF1410184283.html +# http://www.filepup.net/files/R4GBq9XH1410186553.html import re diff --git a/pyload/plugin/hoster/FilerNet.py b/pyload/plugin/hoster/FilerNet.py index 86a5809da..fbefba8db 100644 --- a/pyload/plugin/hoster/FilerNet.py +++ b/pyload/plugin/hoster/FilerNet.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- # # Test links: -# http://filer.net/get/ivgf5ztw53et3ogd -# http://filer.net/get/hgo14gzcng3scbvv +# http://filer.net/get/ivgf5ztw53et3ogd +# http://filer.net/get/hgo14gzcng3scbvv import pycurl import re diff --git a/pyload/plugin/hoster/FilesMailRu.py b/pyload/plugin/hoster/FilesMailRu.py index 024da64cd..0d7f47536 100644 --- a/pyload/plugin/hoster/FilesMailRu.py +++ b/pyload/plugin/hoster/FilesMailRu.py @@ -49,17 +49,17 @@ class FilesMailRu(Hoster): self.html = self.load(pyfile.url) self.url_pattern = '<a href="(.+?)" onclick="return Act\(this\, \'dlink\'\, event\)">(.+?)</a>' - #marks the file as "offline" when the pattern was found on the html-page''' + # marks the file as "offline" when the pattern was found on the html-page''' if r'<div class="errorMessage mb10">' in self.html: self.offline() elif r'Page cannot be displayed' in self.html: self.offline() - #the filename that will be showed in the list (e.g. test.part1.rar)''' + # the filename that will be showed in the list (e.g. test.part1.rar)''' pyfile.name = self.getFileName() - #prepare and download''' + # prepare and download''' if not self.account: self.prepare() self.download(self.getFileUrl()) diff --git a/pyload/plugin/hoster/FileserveCom.py b/pyload/plugin/hoster/FileserveCom.py index 5f93cbd10..1d4179e5c 100644 --- a/pyload/plugin/hoster/FileserveCom.py +++ b/pyload/plugin/hoster/FileserveCom.py @@ -134,7 +134,7 @@ class FileserveCom(Hoster): self.wait() self.retry() - self.thread.m.reconnecting.wait(3) # Ease issue with later downloads appearing to be in parallel + self.thread.m.reconnecting.wait(3) #: Ease issue with later downloads appearing to be in parallel def doTimmer(self): @@ -185,7 +185,7 @@ class FileserveCom(Hoster): def handlePremium(self, pyfile): premium_url = None if self.getClassName() == "FileserveCom": - #try api download + # try api download res = self.load("http://app.fileserve.com/api/download/premium/", post={"username": self.user, "password": self.account.getAccountData(self.user)['password'], diff --git a/pyload/plugin/hoster/FreakshareCom.py b/pyload/plugin/hoster/FreakshareCom.py index 64d8f8308..6cf447128 100644 --- a/pyload/plugin/hoster/FreakshareCom.py +++ b/pyload/plugin/hoster/FreakshareCom.py @@ -87,7 +87,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) @@ -97,9 +97,9 @@ class FreakshareCom(Hoster): if not self.html: self.download_html() if not self.wantReconnect: - self.req_opts = self.get_download_options() # get the Post options for the Request - #file_url = self.pyfile.url - #return file_url + self.req_opts = self.get_download_options() #: get the Post options for the Request + # file_url = self.pyfile.url + # return file_url else: self.offline() @@ -163,11 +163,11 @@ class FreakshareCom(Hoster): def get_download_options(self): re_envelope = re.search(r".*?value=\"Free\sDownload\".*?\n*?(.*?<.*?>\n*)*?\n*\s*?</form>", - self.html).group(0) # get the whole request + self.html).group(0) #: get the whole request to_sort = re.findall(r"<input\stype=\"hidden\"\svalue=\"(.*?)\"\sname=\"(.*?)\"\s\/>", re_envelope) request_options = dict((n, v) for (v, n) in to_sort) - herewego = self.load(self.pyfile.url, None, request_options) # the actual download-Page + herewego = self.load(self.pyfile.url, None, request_options) #: the actual download-Page to_sort = re.findall(r"<input\stype=\".*?\"\svalue=\"(\S*?)\".*?name=\"(\S*?)\"\s.*?\/>", herewego) request_options = dict((n, v) for (v, n) in to_sort) diff --git a/pyload/plugin/hoster/Ftp.py b/pyload/plugin/hoster/Ftp.py index 42ef3c357..86049df04 100644 --- a/pyload/plugin/hoster/Ftp.py +++ b/pyload/plugin/hoster/Ftp.py @@ -64,12 +64,12 @@ class Ftp(Hoster): pyfile.size = int(m.group(1)) self.download(pyfile.url) else: - #Naive ftp directory listing + # Naive ftp directory listing if re.search(r'^25\d.*?"', self.req.http.header, re.M): pyfile.url = pyfile.url.rstrip('/') pkgname = "/".join(pyfile.package().name, urlparse(pyfile.url).path.rpartition('/')[2]) pyfile.url += '/' - self.req.http.c.setopt(48, 1) # CURLOPT_DIRLISTONLY + self.req.http.c.setopt(48, 1) #: CURLOPT_DIRLISTONLY res = self.load(pyfile.url, decode=False) links = [pyfile.url + quote(x) for x in res.splitlines()] self.logDebug("LINKS", links) diff --git a/pyload/plugin/hoster/GooIm.py b/pyload/plugin/hoster/GooIm.py index 8fd958660..322dd6101 100644 --- a/pyload/plugin/hoster/GooIm.py +++ b/pyload/plugin/hoster/GooIm.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # Test links: -# https://goo.im/devs/liquidsmooth/3.x/codina/Nightly/LS-KK-v3.2-2014-08-01-codina.zip +# https://goo.im/devs/liquidsmooth/3.x/codina/Nightly/LS-KK-v3.2-2014-08-01-codina.zip import re diff --git a/pyload/plugin/hoster/LetitbitNet.py b/pyload/plugin/hoster/LetitbitNet.py index 0cfc225e4..35f5f9cf4 100644 --- a/pyload/plugin/hoster/LetitbitNet.py +++ b/pyload/plugin/hoster/LetitbitNet.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- # # API Documentation: -# http://api.letitbit.net/reg/static/api.pdf +# http://api.letitbit.net/reg/static/api.pdf # # Test links: -# http://letitbit.net/download/07874.0b5709a7d3beee2408bb1f2eefce/random.bin.html +# http://letitbit.net/download/07874.0b5709a7d3beee2408bb1f2eefce/random.bin.html import re diff --git a/pyload/plugin/hoster/LoadTo.py b/pyload/plugin/hoster/LoadTo.py index 0b4d40fe9..3a625dbe3 100644 --- a/pyload/plugin/hoster/LoadTo.py +++ b/pyload/plugin/hoster/LoadTo.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- # # Test links: -# http://www.load.to/JWydcofUY6/random.bin -# http://www.load.to/oeSmrfkXE/random100.bin +# http://www.load.to/JWydcofUY6/random.bin +# http://www.load.to/oeSmrfkXE/random100.bin import re diff --git a/pyload/plugin/hoster/MegaCoNz.py b/pyload/plugin/hoster/MegaCoNz.py index 496d4503f..9dea99b23 100644 --- a/pyload/plugin/hoster/MegaCoNz.py +++ b/pyload/plugin/hoster/MegaCoNz.py @@ -126,8 +126,8 @@ class MegaCoNz(Hoster): except IOError, e: self.fail(e) - chunk_size = 2 ** 15 # buffer size, 32k - # file_mac = [0, 0, 0, 0] # calculate CBC-MAC for checksum + chunk_size = 2 ** 15 #: buffer size, 32k + # file_mac = [0, 0, 0, 0] #: calculate CBC-MAC for checksum chunks = os.path.getsize(file_crypted) / chunk_size + 1 for i in xrange(chunks): diff --git a/pyload/plugin/hoster/MegaRapidoNet.py b/pyload/plugin/hoster/MegaRapidoNet.py index 311189d1c..54a167b65 100644 --- a/pyload/plugin/hoster/MegaRapidoNet.py +++ b/pyload/plugin/hoster/MegaRapidoNet.py @@ -8,7 +8,7 @@ from pyload.plugin.internal.MultiHoster import MultiHoster def random_with_N_digits(n): rand = "0." not_zero = 0 - for _i in range(1, n + 1): + for _i in xrange(1, n + 1): r = randint(0, 9) if(r > 0): not_zero += 1 diff --git a/pyload/plugin/hoster/NetloadIn.py b/pyload/plugin/hoster/NetloadIn.py index 51bc2a600..f4421615f 100644 --- a/pyload/plugin/hoster/NetloadIn.py +++ b/pyload/plugin/hoster/NetloadIn.py @@ -120,7 +120,7 @@ class NetloadIn(Hoster): match = id_regex.search(url) if match: - #normalize url + # normalize url self.url = 'http://www.netload.in/datei%s.htm' % match.group('ID') self.logDebug("URL: %s" % self.url) else: @@ -152,9 +152,9 @@ class NetloadIn(Hoster): if self.api_data['status'] == "online": self.api_data['checksum'] = lines[4].strip() else: - self.api_data = False # check manually since api data is useless sometimes + self.api_data = False #: check manually since api data is useless sometimes - if lines[0] == lines[1] and lines[2] == "0": # useless api data + if lines[0] == lines[1] and lines[2] == "0": #: useless api data self.api_data = False else: self.api_data = False diff --git a/pyload/plugin/hoster/NovafileCom.py b/pyload/plugin/hoster/NovafileCom.py index 82f92959b..f76d77269 100644 --- a/pyload/plugin/hoster/NovafileCom.py +++ b/pyload/plugin/hoster/NovafileCom.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- # # Test links: -# http://novafile.com/vfun4z6o2cit -# http://novafile.com/s6zrr5wemuz4 +# http://novafile.com/vfun4z6o2cit +# http://novafile.com/s6zrr5wemuz4 from pyload.plugin.internal.XFSHoster import XFSHoster diff --git a/pyload/plugin/hoster/OboomCom.py b/pyload/plugin/hoster/OboomCom.py index 07c40a397..5b9b11485 100644 --- a/pyload/plugin/hoster/OboomCom.py +++ b/pyload/plugin/hoster/OboomCom.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # Test links: -# https://www.oboom.com/B7CYZIEB/10Mio.dat +# https://www.oboom.com/B7CYZIEB/10Mio.dat import re @@ -99,7 +99,7 @@ class OboomCom(Hoster): self.retry(5, 15 * 60, _("Service unavailable")) elif result[0] == 403: - if result[1] == -1: # another download is running + if result[1] == -1: #: another download is running self.setWait(15 * 60) else: self.setWait(result[1], True) diff --git a/pyload/plugin/hoster/PornhostCom.py b/pyload/plugin/hoster/PornhostCom.py index f6a63117c..103882166 100644 --- a/pyload/plugin/hoster/PornhostCom.py +++ b/pyload/plugin/hoster/PornhostCom.py @@ -47,7 +47,7 @@ class PornhostCom(Hoster): url = re.search(r'width: 894px; height: 675px">.*?<img src="(.*?)"', self.html) if url is None: url = re.search(r'"http://file\d+\.pornhost\.com/\d+/.*?"', - self.html) # TODO: fix this one since it doesn't match + self.html) #: TODO: fix this one since it doesn't match return url.group(1).strip() diff --git a/pyload/plugin/hoster/PremiumTo.py b/pyload/plugin/hoster/PremiumTo.py index c7ee09565..750e965d2 100644 --- a/pyload/plugin/hoster/PremiumTo.py +++ b/pyload/plugin/hoster/PremiumTo.py @@ -27,7 +27,7 @@ class PremiumTo(MultiHoster): def handlePremium(self, pyfile): - #raise timeout to 2min + # raise timeout to 2min self.download("http://premium.to/api/getfile.php", get={'username': self.account.username, 'password': self.account.password, diff --git a/pyload/plugin/hoster/PremiumizeMe.py b/pyload/plugin/hoster/PremiumizeMe.py index 809d27624..f577da90e 100644 --- a/pyload/plugin/hoster/PremiumizeMe.py +++ b/pyload/plugin/hoster/PremiumizeMe.py @@ -20,7 +20,7 @@ class PremiumizeMe(MultiHoster): def handlePremium(self, pyfile): # In some cases hostsers do not supply us with a filename at download, so we # are going to set a fall back filename (e.g. for freakshare or xfileshare) - pyfile.name = pyfile.name.split('/').pop() # Remove everthing before last slash + pyfile.name = pyfile.name.split('/').pop() #: Remove everthing before last slash # Correction for automatic assigned filename: Removing html at end if needed suffix_to_remove = ["html", "htm", "php", "php3", "asp", "shtm", "shtml", "cfml", "cfm"] diff --git a/pyload/plugin/hoster/RPNetBiz.py b/pyload/plugin/hoster/RPNetBiz.py index 6788eebce..dc11eefb2 100644 --- a/pyload/plugin/hoster/RPNetBiz.py +++ b/pyload/plugin/hoster/RPNetBiz.py @@ -34,12 +34,12 @@ class RPNetBiz(MultiHoster): "links" : pyfile.url}) self.logDebug("JSON data: %s" % res) - link_status = json_loads(res)['links'][0] # get the first link... since we only queried one + link_status = json_loads(res)['links'][0] #: get the first link... since we only queried one # Check if we only have an id as a HDD link if 'id' in link_status: self.logDebug("Need to wait at least 30 seconds before requery") - self.setWait(30) # wait for 30 seconds + self.setWait(30) #: wait for 30 seconds self.wait() # Lets query the server again asking for the status on the link, # we need to keep doing this until we reach 100 @@ -66,7 +66,7 @@ class RPNetBiz(MultiHoster): self.wait() my_try += 1 - if my_try > max_tries: # We went over the limit! + if my_try > max_tries: #: We went over the limit! self.fail(_("Waited for about 15 minutes for download to finish but failed")) if 'generated' in link_status: diff --git a/pyload/plugin/hoster/RemixshareCom.py b/pyload/plugin/hoster/RemixshareCom.py index 6e376fd6d..ba61887cd 100644 --- a/pyload/plugin/hoster/RemixshareCom.py +++ b/pyload/plugin/hoster/RemixshareCom.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- # # Test links: -# http://remixshare.com/download/z8uli +# http://remixshare.com/download/z8uli # # Note: -# The remixshare.com website is very very slow, so -# if your download not starts because of pycurl timeouts: -# Adjust timeouts in /usr/share/pyload/pyload/network/HTTPRequest.py +# The remixshare.com website is very very slow, so +# if your download not starts because of pycurl timeouts: +# Adjust timeouts in /usr/share/pyload/pyload/network/HTTPRequest.py import re diff --git a/pyload/plugin/hoster/ShareplaceCom.py b/pyload/plugin/hoster/ShareplaceCom.py index 7d9630d20..08fb966b8 100644 --- a/pyload/plugin/hoster/ShareplaceCom.py +++ b/pyload/plugin/hoster/ShareplaceCom.py @@ -40,7 +40,7 @@ class ShareplaceCom(Hoster): if not self.html: self.download_html() - #var zzipitime = 15; + # var zzipitime = 15; m = re.search(r'var zzipitime = (\d+);', self.html) if m: sec = int(m.group(1)) diff --git a/pyload/plugin/hoster/SimplydebridCom.py b/pyload/plugin/hoster/SimplydebridCom.py index 2fa68b508..d703c3e52 100644 --- a/pyload/plugin/hoster/SimplydebridCom.py +++ b/pyload/plugin/hoster/SimplydebridCom.py @@ -19,7 +19,7 @@ class SimplydebridCom(MultiHoster): def handlePremium(self, pyfile): - #fix the links for simply-debrid.com! + # fix the links for simply-debrid.com! self.link = replace_patterns(pyfile.url, [("clz.to", "cloudzer.net/file") ("http://share-online", "http://www.share-online") ("ul.to", "uploaded.net/file") diff --git a/pyload/plugin/hoster/SmoozedCom.py b/pyload/plugin/hoster/SmoozedCom.py index 1ed3a539d..f216a95bc 100644 --- a/pyload/plugin/hoster/SmoozedCom.py +++ b/pyload/plugin/hoster/SmoozedCom.py @@ -20,7 +20,7 @@ class SmoozedCom(MultiHoster): def handlePremium(self, pyfile): # In some cases hostsers do not supply us with a filename at download, so we # are going to set a fall back filename (e.g. for freakshare or xfileshare) - pyfile.name = pyfile.name.split('/').pop() # Remove everthing before last slash + pyfile.name = pyfile.name.split('/').pop() #: Remove everthing before last slash # Correction for automatic assigned filename: Removing html at end if needed suffix_to_remove = ["html", "htm", "php", "php3", "asp", "shtm", "shtml", "cfml", "cfm"] diff --git a/pyload/plugin/hoster/SolidfilesCom.py b/pyload/plugin/hoster/SolidfilesCom.py index 39e5dd010..9998f26ad 100644 --- a/pyload/plugin/hoster/SolidfilesCom.py +++ b/pyload/plugin/hoster/SolidfilesCom.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # Test links: -# http://www.solidfiles.com/d/609cdb4b1b +# http://www.solidfiles.com/d/609cdb4b1b from pyload.plugin.internal.SimpleHoster import SimpleHoster diff --git a/pyload/plugin/hoster/SpeedyshareCom.py b/pyload/plugin/hoster/SpeedyshareCom.py index 99626c765..b6d0a5898 100644 --- a/pyload/plugin/hoster/SpeedyshareCom.py +++ b/pyload/plugin/hoster/SpeedyshareCom.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # Test links: -# http://speedy.sh/ep2qY/Zapp-Brannigan.jpg +# http://speedy.sh/ep2qY/Zapp-Brannigan.jpg import re diff --git a/pyload/plugin/hoster/UlozTo.py b/pyload/plugin/hoster/UlozTo.py index b2e31dccf..49d5d2ac1 100644 --- a/pyload/plugin/hoster/UlozTo.py +++ b/pyload/plugin/hoster/UlozTo.py @@ -123,7 +123,7 @@ class UlozTo(SimpleHoster): "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. + "server_error" : 'src="http://img.ulozto.cz/error403/vykricnik.jpg"', #: paralell dl, server overload etc. "not_found" : "<title>Ulož.to</title>" }) diff --git a/pyload/plugin/hoster/UploadedTo.py b/pyload/plugin/hoster/UploadedTo.py index 487c01576..c8b201ec6 100644 --- a/pyload/plugin/hoster/UploadedTo.py +++ b/pyload/plugin/hoster/UploadedTo.py @@ -57,7 +57,7 @@ class UploadedTo(SimpleHoster): def setup(self): self.multiDL = self.resumeDownload = self.premium - self.chunkLimit = 1 # critical problems with more chunks + self.chunkLimit = 1 #: critical problems with more chunks def checkErrors(self): @@ -68,14 +68,14 @@ class UploadedTo(SimpleHoster): elif "limit-size" in self.html: self.fail(_("File too big for free download")) - elif "limit-slot" in self.html: # Temporary restriction so just wait a bit + elif "limit-slot" in self.html: #: Temporary restriction so just wait a bit self.wait(30 * 60, True) self.retry() elif "limit-parallel" in self.html: self.fail(_("Cannot download in parallel")) - elif "limit-dl" in self.html or self.DL_LIMIT_ERROR in self.html: # limit-dl + elif "limit-dl" in self.html or self.DL_LIMIT_ERROR in self.html: #: limit-dl self.wait(3 * 60 * 60, True) self.retry() diff --git a/pyload/plugin/hoster/UploadheroCom.py b/pyload/plugin/hoster/UploadheroCom.py index 912f4c505..d1c9fd2c7 100644 --- a/pyload/plugin/hoster/UploadheroCom.py +++ b/pyload/plugin/hoster/UploadheroCom.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # Test links: -# http://uploadhero.co/dl/wQBRAVSM +# http://uploadhero.co/dl/wQBRAVSM import re diff --git a/pyload/plugin/hoster/VidPlayNet.py b/pyload/plugin/hoster/VidPlayNet.py index ab571f9ea..5d98d2fb3 100644 --- a/pyload/plugin/hoster/VidPlayNet.py +++ b/pyload/plugin/hoster/VidPlayNet.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # Test links: -# BigBuckBunny_320x180.mp4 - 61.7 Mb - http://vidplay.net/38lkev0h3jv0 +# http://vidplay.net/38lkev0h3jv0 from pyload.plugin.internal.XFSHoster import XFSHoster diff --git a/pyload/plugin/hoster/Xdcc.py b/pyload/plugin/hoster/Xdcc.py index 30c7b7c22..6943f495e 100644 --- a/pyload/plugin/hoster/Xdcc.py +++ b/pyload/plugin/hoster/Xdcc.py @@ -29,7 +29,7 @@ class Xdcc(Hoster): def setup(self): - self.debug = 0 # 0,1,2 + self.debug = 0 #: 0,1,2 self.timeout = 30 self.multiDL = False @@ -62,7 +62,7 @@ class Xdcc(Hoster): def doDownload(self, url): - self.pyfile.setStatus("waiting") # real link + self.pyfile.setStatus("waiting") #: real link m = re.match(r'xdcc://(.*?)/#?(.*?)/(.*?)/#?(\d+)/?', url) server = m.group(1) @@ -89,7 +89,7 @@ class Xdcc(Hoster): sock = socket.socket() sock.connect((host, int(port))) if nick == "pyload": - nick = "pyload-%d" % (time.time() % 1000) # last 3 digits + nick = "pyload-%d" % (time.time() % 1000) #: last 3 digits sock.send("NICK %s\r\n" % nick) sock.send("USER %s %s bla :%s\r\n" % (ident, host, real)) @@ -161,7 +161,7 @@ class Xdcc(Hoster): self.logDebug("Sending CTCP TIME") sock.send("NOTICE %s :%d\r\n" % (msg['origin'], time.time())) elif msg['text'] == "\x01LAG\x01": - pass # don't know how to answer + pass #: don't know how to answer if not (bot == msg['origin'][0:len(bot)] and nick == msg['target'][0:len(nick)] diff --git a/pyload/plugin/hoster/YourfilesTo.py b/pyload/plugin/hoster/YourfilesTo.py index a3d5e310c..f5e778741 100644 --- a/pyload/plugin/hoster/YourfilesTo.py +++ b/pyload/plugin/hoster/YourfilesTo.py @@ -41,7 +41,7 @@ class YourfilesTo(Hoster): if not self.html: self.download_html() - #var zzipitime = 15; + # var zzipitime = 15; m = re.search(r'var zzipitime = (\d+);', self.html) if m: sec = int(m.group(1)) diff --git a/pyload/plugin/hoster/YoutubeCom.py b/pyload/plugin/hoster/YoutubeCom.py index 14503be03..5db9957f8 100644 --- a/pyload/plugin/hoster/YoutubeCom.py +++ b/pyload/plugin/hoster/YoutubeCom.py @@ -94,7 +94,7 @@ class YoutubeCom(Hoster): if "We have been receiving a large volume of requests from your network." in html: self.tempOffline() - #get config + # get config use3d = self.getConfig('3d') if use3d: @@ -113,7 +113,7 @@ class YoutubeCom(Hoster): self.logWarning(_("FMT %d unknown, using default") % desired_fmt) desired_fmt = 0 - #parse available streams + # parse available streams streams = re.search(r'"url_encoded_fmt_stream_map":"(.+?)",', html).group(1) streams = [x.split('\u0026') for x in streams.split(',')] streams = [dict((y.split('=', 1)) for y in x) for x in streams] @@ -123,7 +123,7 @@ class YoutubeCom(Hoster): self.logDebug("AVAILABLE STREAMS: %s" % [x[0] for x in streams]) - #build dictionary of supported itags (3D/2D) + # build dictionary of supported itags (3D/2D) allowed = lambda x: self.getConfig(self.formats[x][0]) streams = [x for x in streams if x[0] in self.formats and allowed(x[0])] @@ -136,11 +136,11 @@ class YoutubeCom(Hoster): (desired_fmt, "%s %dx%d Q:%d 3D:%s" % self.formats[desired_fmt], "" if desired_fmt in fmt_dict else "NOT ", "" if allowed(desired_fmt) else "NOT ")) - #return fmt nearest to quality index + # return fmt nearest to quality index if desired_fmt in fmt_dict and allowed(desired_fmt): fmt = desired_fmt else: - sel = lambda x: self.formats[x][3] # select quality index + sel = lambda x: self.formats[x][3] #: select quality index comp = lambda x, y: abs(sel(x) - sel(y)) self.logDebug("Choosing nearest fmt: %s" % [(x, allowed(x), comp(x, desired_fmt)) for x in fmt_dict.keys()]) @@ -154,7 +154,7 @@ class YoutubeCom(Hoster): self.logDebug("URL: %s" % url) - #set file name + # set file name file_suffix = self.formats[fmt][0] if fmt in self.formats else ".flv" file_name_pattern = '<meta name="title" content="(.+?)">' name = re.search(file_name_pattern, html).group(1).replace("/", "") diff --git a/pyload/plugin/hoster/ZippyshareCom.py b/pyload/plugin/hoster/ZippyshareCom.py index dd78071c9..7f91c04e5 100644 --- a/pyload/plugin/hoster/ZippyshareCom.py +++ b/pyload/plugin/hoster/ZippyshareCom.py @@ -68,7 +68,7 @@ class ZippyshareCom(SimpleHoster): def replElementById(element): id = element.group(1) #: id might be either 'x' (a real id) or x (a variable) - attr = element.group(4) # attr might be None + attr = element.group(4) #: attr might be None varName = re.sub(r'-', '', 'GVAR[%s+"_%s"]' %(id, attr)) |