summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Stefano <l.stickell@yahoo.it> 2014-04-18 16:21:42 +0200
committerGravatar Stefano <l.stickell@yahoo.it> 2014-04-21 17:23:19 +0200
commite484775f328c032ae7fb0182772f581271e8cd13 (patch)
treecc2b44825b53988218cf56c5cf76bece12697ba6
parentUsing in instead of has_key (diff)
downloadpyload-e484775f328c032ae7fb0182772f581271e8cd13.tar.xz
Fixed some PEP8 violations
(cherry picked from commit 1db169b2a7f1df66777a1045b17fc948b1b45c42)
-rw-r--r--module/plugins/hoster/FreeWayMe.py1
-rw-r--r--pyload/plugins/hoster/DepositfilesCom.py2
-rw-r--r--pyload/plugins/hoster/FileserveCom.py4
-rw-r--r--pyload/plugins/hoster/MovReelCom.py1
-rw-r--r--pyload/plugins/hoster/NetloadIn.py2
-rw-r--r--pyload/plugins/hoster/OneFichierCom.py8
-rw-r--r--pyload/plugins/hoster/SimplydebridCom.py2
-rw-r--r--pyload/plugins/hoster/UlozTo.py3
-rw-r--r--pyload/plugins/hoster/Xdcc.py2
9 files changed, 14 insertions, 11 deletions
diff --git a/module/plugins/hoster/FreeWayMe.py b/module/plugins/hoster/FreeWayMe.py
index 20a53108c..d72b12a12 100644
--- a/module/plugins/hoster/FreeWayMe.py
+++ b/module/plugins/hoster/FreeWayMe.py
@@ -19,6 +19,7 @@
from module.plugins.Hoster import Hoster
+
class FreeWayMe(Hoster):
__name__ = "FreeWayMe"
__version__ = "0.11"
diff --git a/pyload/plugins/hoster/DepositfilesCom.py b/pyload/plugins/hoster/DepositfilesCom.py
index 81523234d..11b4f4112 100644
--- a/pyload/plugins/hoster/DepositfilesCom.py
+++ b/pyload/plugins/hoster/DepositfilesCom.py
@@ -20,7 +20,7 @@ class DepositfilesCom(SimpleHoster):
FILE_OFFLINE_PATTERN = r'<span class="html_download_api-not_exists"></span>'
FILE_URL_REPLACEMENTS = [(r"\.com(/.*?)?/files", ".com/en/files"), (r"\.html$", "")]
FILE_NAME_REPLACEMENTS = [(r'\%u([0-9A-Fa-f]{4})', lambda m: unichr(int(m.group(1), 16))),
- (r'.*<b title="(?P<N>[^"]+).*', "\g<N>" )]
+ (r'.*<b title="(?P<N>[^"]+).*', "\g<N>")]
RECAPTCHA_PATTERN = r"Recaptcha.create\('([^']+)'"
DOWNLOAD_LINK_PATTERN = r'<form id="downloader_file_form" action="(http://.+?\.(dfiles\.eu|depositfiles\.com)/.+?)" method="post"'
diff --git a/pyload/plugins/hoster/FileserveCom.py b/pyload/plugins/hoster/FileserveCom.py
index c28bae456..4c678c1b1 100644
--- a/pyload/plugins/hoster/FileserveCom.py
+++ b/pyload/plugins/hoster/FileserveCom.py
@@ -91,7 +91,7 @@ class FileserveCom(Hoster):
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"},
decode=True)
self.doLongWait(re.search(self.LONG_WAIT_PATTERN, self.html))
@@ -134,7 +134,7 @@ class FileserveCom(Hoster):
self.doLongWait(self.lastCheck)
elif check == "limit":
#download limited reached for today (not a exact time known)
- self.setWait(3 * 60 * 60, True) # wait 3 hours #TO-DO: resolve waittime using UnrestrictLi's secondsToMidnight
+ self.setWait(3 * 60 * 60, True) # wait 3 hours #TO-DO: resolve waittime using UnrestrictLi's secondsToMidnight
self.wait()
self.retry()
diff --git a/pyload/plugins/hoster/MovReelCom.py b/pyload/plugins/hoster/MovReelCom.py
index ca13fb717..2dedcf13d 100644
--- a/pyload/plugins/hoster/MovReelCom.py
+++ b/pyload/plugins/hoster/MovReelCom.py
@@ -4,6 +4,7 @@
from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInfo
#from pycurl import FOLLOWLOCATION, LOW_SPEED_TIME
+
class MovReelCom(XFileSharingPro):
__name__ = "MovReelCom"
__type__ = "hoster"
diff --git a/pyload/plugins/hoster/NetloadIn.py b/pyload/plugins/hoster/NetloadIn.py
index fa27c58df..4b8842d18 100644
--- a/pyload/plugins/hoster/NetloadIn.py
+++ b/pyload/plugins/hoster/NetloadIn.py
@@ -40,7 +40,7 @@ def getInfo(urls):
size = int(tmp[2])
except:
size = 0
- result.append((tmp[1], size, 2 if tmp[3] == "online" else 1, chunk[i] ))
+ result.append((tmp[1], size, 2 if tmp[3] == "online" else 1, chunk[i]))
except:
print "Netload prefetch: Error while processing response: "
print r
diff --git a/pyload/plugins/hoster/OneFichierCom.py b/pyload/plugins/hoster/OneFichierCom.py
index 6b4b51d8c..923a19c86 100644
--- a/pyload/plugins/hoster/OneFichierCom.py
+++ b/pyload/plugins/hoster/OneFichierCom.py
@@ -26,7 +26,7 @@ class OneFichierCom(SimpleHoster):
WAITING_PATTERN = "Warning ! Without premium status, you must wait up to (\d+) minutes between each downloads"
LAST_DOWNLOAD_DELAY = "Your last download finished (\d+) minutes ago"
NOT_PARALLEL = r"Warning ! Without premium status, you can download only one file at a time"
- RETRY_TIME = 15*60 #Default retry time in seconds (if detected parallel download)
+ RETRY_TIME = 15*60 # Default retry time in seconds (if detected parallel download)
def process(self, pyfile):
found = re.match(self.__pattern__, pyfile.url)
@@ -38,13 +38,13 @@ class OneFichierCom(SimpleHoster):
found = re.search(self.WAITING_PATTERN, self.html)
if found:
- last_delay=0
+ last_delay = 0
# retrieve the delay from the last download to substract from required delay
found_delay = re.search(self.LAST_DOWNLOAD_DELAY, self.html)
if found_delay:
- last_delay=int(found_delay.group(1))
+ last_delay = int(found_delay.group(1))
self.waitAndRetry((int(found.group(1)) - last_delay) * 60)
- else: #detect parallel download
+ else: # detect parallel download
found = re.search(self.NOT_PARALLEL, self.html)
if found:
self.waitAndRetry(self.RETRY_TIME)
diff --git a/pyload/plugins/hoster/SimplydebridCom.py b/pyload/plugins/hoster/SimplydebridCom.py
index c364819a0..2f2f666ba 100644
--- a/pyload/plugins/hoster/SimplydebridCom.py
+++ b/pyload/plugins/hoster/SimplydebridCom.py
@@ -43,7 +43,7 @@ class SimplydebridCom(Hoster):
self.logDebug("New URL: %s" % new_url)
if not re.match(self.__pattern__, new_url):
- page = self.load('http://simply-debrid.com/api.php', get={'dl': new_url}) #+'&u='+self.user+'&p='+self.account.getAccountData(self.user)['password'])
+ page = self.load('http://simply-debrid.com/api.php', get={'dl': new_url}) # +'&u='+self.user+'&p='+self.account.getAccountData(self.user)['password'])
if 'tiger Link' in page or 'Invalid Link' in page or ('API' in page and 'ERROR' in page):
self.fail('Unable to unrestrict link')
new_url = page
diff --git a/pyload/plugins/hoster/UlozTo.py b/pyload/plugins/hoster/UlozTo.py
index ea0c70fec..65e941981 100644
--- a/pyload/plugins/hoster/UlozTo.py
+++ b/pyload/plugins/hoster/UlozTo.py
@@ -26,6 +26,7 @@ def convertDecimalPrefix(m):
# decimal prefixes used in filesize and traffic
return ("%%.%df" % {'k': 3, 'M': 6, 'G': 9}[m.group(2)] % float(m.group(1))).replace('.', '')
+
class UlozTo(SimpleHoster):
__name__ = "UlozTo"
__type__ = "hoster"
@@ -110,7 +111,7 @@ class UlozTo(SimpleHoster):
# New version - better to get new parameters (like captcha reload) because of image url - since 6.12.2013
self.logDebug('Using "new" version')
- xapca = self.load("http://www.ulozto.net/reloadXapca.php", get = { "rnd": str(int(time.time()))})
+ xapca = self.load("http://www.ulozto.net/reloadXapca.php", get={"rnd": str(int(time.time()))})
self.logDebug('xapca = ' + str(xapca))
data = json_loads(xapca)
diff --git a/pyload/plugins/hoster/Xdcc.py b/pyload/plugins/hoster/Xdcc.py
index d358c63b5..53f61836b 100644
--- a/pyload/plugins/hoster/Xdcc.py
+++ b/pyload/plugins/hoster/Xdcc.py
@@ -132,7 +132,7 @@ class Xdcc(Hoster):
sock.send("PRIVMSG %s :xdcc send #%s\r\n" % (bot, pack))
else:
- if (dl_time + self.timeout) < time.time(): # todo: add in config
+ if (dl_time + self.timeout) < time.time(): # todo: add in config
sock.send("QUIT :byebye\r\n")
sock.close()
self.fail("XDCC Bot did not answer")