summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/FastshareCz.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-22 19:47:00 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-22 19:47:00 +0200
commit1b096b2eb2634e8dea80b06ab9ecde206b198b35 (patch)
treec37727ef1c0c43c553725c6a4ae92022f48bcc23 /module/plugins/hoster/FastshareCz.py
parent[Keep2shareCC] Fix CAPTCHA_PATTERN (diff)
downloadpyload-1b096b2eb2634e8dea80b06ab9ecde206b198b35.tar.xz
Spare code cosmetics
Diffstat (limited to 'module/plugins/hoster/FastshareCz.py')
-rw-r--r--module/plugins/hoster/FastshareCz.py19
1 files changed, 7 insertions, 12 deletions
diff --git a/module/plugins/hoster/FastshareCz.py b/module/plugins/hoster/FastshareCz.py
index 337977095..2a8d3af7d 100644
--- a/module/plugins/hoster/FastshareCz.py
+++ b/module/plugins/hoster/FastshareCz.py
@@ -64,20 +64,15 @@ class FastshareCz(SimpleHoster):
header = self.load(self.pyfile.url, just_header=True)
if "location" in header:
url = header['location']
+ elif self.CREDIT_PATTERN in self.html:
+ self.logWarning("Not enough traffic left")
+ self.resetAccount()
else:
- self.html = self.load(self.pyfile.url)
-
- self.getFileInfo() #
-
- if self.CREDIT_PATTERN in self.html:
- self.logWarning("Not enough traffic left")
- self.resetAccount()
+ m = re.search(self.PREMIUM_URL_PATTERN, self.html)
+ if m:
+ url = m.group(1)
else:
- m = re.search(self.PREMIUM_URL_PATTERN, self.html)
- if m:
- url = m.group(1)
- else:
- self.error("Premium URL")
+ self.error("Premium URL")
self.logDebug("PREMIUM URL: " + url)
self.download(url, disposition=True)