summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-05 22:14:53 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-05 22:14:53 +0200
commitff91b58bf9ee65aaeb048426295af6ad122b119e (patch)
tree1518b797739524427ec0c60551c13300feec3a93 /module/plugins/hoster
parent[SimpleHoster] Added default handle patterns LINK_FREE_PATTERN and LINK_PREMI... (diff)
downloadpyload-ff91b58bf9ee65aaeb048426295af6ad122b119e.tar.xz
Spare code cosmetics
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r--module/plugins/hoster/AlldebridCom.py4
-rw-r--r--module/plugins/hoster/CzshareCom.py4
-rw-r--r--module/plugins/hoster/DevhostSt.py4
-rw-r--r--module/plugins/hoster/DropboxCom.py4
-rw-r--r--module/plugins/hoster/FastshareCz.py5
-rw-r--r--module/plugins/hoster/FilepupNet.py2
-rw-r--r--module/plugins/hoster/KingfilesNet.py4
-rw-r--r--module/plugins/hoster/SpeedyshareCom.py4
8 files changed, 15 insertions, 16 deletions
diff --git a/module/plugins/hoster/AlldebridCom.py b/module/plugins/hoster/AlldebridCom.py
index b1513bbac..44d709b1d 100644
--- a/module/plugins/hoster/AlldebridCom.py
+++ b/module/plugins/hoster/AlldebridCom.py
@@ -78,8 +78,8 @@ class AlldebridCom(Hoster):
self.download(new_url, disposition=True)
- check = self.checkDownload({"error": "<title>An error occured while processing your request</title>",
- "empty": re.compile(r"^$")})
+ check = self.checkDownload({'error': "<title>An error occured while processing your request</title>",
+ 'empty': re.compile(r"^$")})
if check == "error":
self.retry(wait_time=60, reason="An error occured while generating link.")
diff --git a/module/plugins/hoster/CzshareCom.py b/module/plugins/hoster/CzshareCom.py
index df8cfea9e..f7fb119ac 100644
--- a/module/plugins/hoster/CzshareCom.py
+++ b/module/plugins/hoster/CzshareCom.py
@@ -128,13 +128,13 @@ class CzshareCom(SimpleHoster):
def checkDownloadedFile(self):
# check download
check = self.checkDownload({
- "tempoffline": re.compile(r"^Soubor je do.*asn.* nedostupn.*$"),
+ "temp_offline": re.compile(r"^Soubor je do.*asn.* nedostupn.*$"),
"credit": re.compile(r"^Nem.*te dostate.*n.* kredit.$"),
"multi_dl": re.compile(self.MULTIDL_PATTERN),
"captcha_err": "<li>Zadaný ověřovací kód nesouhlasí!</li>"
})
- if check == "tempoffline":
+ if check == "temp_offline":
self.fail("File not available - try later")
if check == "credit":
self.resetAccount()
diff --git a/module/plugins/hoster/DevhostSt.py b/module/plugins/hoster/DevhostSt.py
index 088ace93a..b50257238 100644
--- a/module/plugins/hoster/DevhostSt.py
+++ b/module/plugins/hoster/DevhostSt.py
@@ -41,8 +41,8 @@ class DevhostSt(SimpleHoster):
self.logDebug("Download URL = " + dl_url)
self.download(dl_url, disposition=True)
- check = self.checkDownload({'is_html': re.compile("html")})
- if check == "is_html":
+ check = self.checkDownload({'html': re.compile("html")})
+ if check == "html":
self.parseError("Downloaded file is an html file")
diff --git a/module/plugins/hoster/DropboxCom.py b/module/plugins/hoster/DropboxCom.py
index 07e251946..e5de6823d 100644
--- a/module/plugins/hoster/DropboxCom.py
+++ b/module/plugins/hoster/DropboxCom.py
@@ -34,8 +34,8 @@ class DropboxCom(SimpleHoster):
def handleFree(self):
self.download(self.pyfile.url, get={'dl': "1"})
- check = self.checkDownload({'is_html': re.compile("html")})
- if check == "is_html":
+ check = self.checkDownload({'html': re.compile("html")})
+ if check == "html":
self.parseError("Downloaded file is an html file")
diff --git a/module/plugins/hoster/FastshareCz.py b/module/plugins/hoster/FastshareCz.py
index 5a6773af6..7a70baf93 100644
--- a/module/plugins/hoster/FastshareCz.py
+++ b/module/plugins/hoster/FastshareCz.py
@@ -48,9 +48,8 @@ class FastshareCz(SimpleHoster):
self.download(urljoin(baseurl, action), post={"code": captcha, "btn.x": 77, "btn.y": 18})
check = self.checkDownload({
- "paralell_dl":
- "<title>FastShare.cz</title>|<script>alert\('Pres FREE muzete stahovat jen jeden soubor najednou.'\)",
- "wrong_captcha": "Download for FREE"
+ 'paralell_dl': "<title>FastShare.cz</title>|<script>alert\('Pres FREE muzete stahovat jen jeden soubor najednou.'\)",
+ 'wrong_captcha': "Download for FREE"
})
if check == "paralell_dl":
diff --git a/module/plugins/hoster/FilepupNet.py b/module/plugins/hoster/FilepupNet.py
index 69065565f..b09f12940 100644
--- a/module/plugins/hoster/FilepupNet.py
+++ b/module/plugins/hoster/FilepupNet.py
@@ -14,7 +14,7 @@ class FilepupNet(SimpleHoster):
__type__ = "hoster"
__version__ = "0.01"
- __pattern__ = r"http://(?:www\.)?filepup\.net/files/\w+"
+ __pattern__ = r'http://(?:www\.)?filepup\.net/files/\w+'
__description__ = """Filepup.net hoster plugin"""
__author_name__ = ("zapp-brannigan", "Walter Purcaro")
diff --git a/module/plugins/hoster/KingfilesNet.py b/module/plugins/hoster/KingfilesNet.py
index e8aefa53b..208946805 100644
--- a/module/plugins/hoster/KingfilesNet.py
+++ b/module/plugins/hoster/KingfilesNet.py
@@ -78,8 +78,8 @@ class KingfilesNet(SimpleHoster):
dl_url = m.group(1)
self.download(dl_url, cookies=True, disposition=True)
- check = self.checkDownload({'is_html': re.compile("<html>")})
- if check == "is_html":
+ check = self.checkDownload({'html': re.compile("<html>")})
+ if check == "html":
self.parseError("Downloaded file is an html file")
diff --git a/module/plugins/hoster/SpeedyshareCom.py b/module/plugins/hoster/SpeedyshareCom.py
index 78b3b28c6..772d3ad62 100644
--- a/module/plugins/hoster/SpeedyshareCom.py
+++ b/module/plugins/hoster/SpeedyshareCom.py
@@ -43,8 +43,8 @@ class SpeedyshareCom(SimpleHoster):
dl_link = urljoin("http://www.speedyshare.com", m.group(1))
self.download(dl_link, disposition=True)
- check = self.checkDownload({'is_html': re.compile("html")})
- if check == "is_html":
+ check = self.checkDownload({'html': re.compile("html")})
+ if check == "html":
self.parseError("Downloaded file is an html file")