summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-25 01:16:52 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-25 01:16:52 +0200
commitc41d4ec4c5935ee702a44e919730971028bf5724 (patch)
treef9e557abaa0c9c0161859b9705ae8414a95ecaef /module/plugins/internal
parentUse parseTraffic instead parseFileSize in accounts (diff)
downloadpyload-c41d4ec4c5935ee702a44e919730971028bf5724.tar.xz
Fix and improve plugins logging
Diffstat (limited to 'module/plugins/internal')
-rw-r--r--module/plugins/internal/SimpleHoster.py2
-rw-r--r--module/plugins/internal/XFSPHoster.py5
2 files changed, 5 insertions, 2 deletions
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py
index be3e3c8fc..51010d569 100644
--- a/module/plugins/internal/SimpleHoster.py
+++ b/module/plugins/internal/SimpleHoster.py
@@ -221,10 +221,12 @@ class SimpleHoster(Hoster):
self.getFileInfo()
if self.premium and (not self.FORCE_CHECK_TRAFFIC or self.checkTrafficLeft()):
+ self.logDebug("Handle as premium download")
self.handlePremium()
elif premium_only:
self.fail("This link require a premium account")
else:
+ self.logDebug("Handle as free download")
self.handleFree()
diff --git a/module/plugins/internal/XFSPHoster.py b/module/plugins/internal/XFSPHoster.py
index 91a69116c..87a82beaf 100644
--- a/module/plugins/internal/XFSPHoster.py
+++ b/module/plugins/internal/XFSPHoster.py
@@ -102,8 +102,10 @@ class XFSPHoster(SimpleHoster):
if self.location:
self.startDownload(self.location)
elif self.premium:
+ self.logDebug("Handle as premium download")
self.handlePremium()
else:
+ self.logDebug("Handle as free download")
self.handleFree()
@@ -126,7 +128,6 @@ class XFSPHoster(SimpleHoster):
def handleFree(self):
url = self.getDownloadLink()
- self.logDebug("Download URL: %s" % url)
self.startDownload(url)
@@ -312,7 +313,7 @@ class XFSPHoster(SimpleHoster):
inputs['code'] = self.decryptCaptcha(captcha_url)
return 1
- m = re.search(self.CAPTCHA_DIV_PATTERN, self.html, re.DOTALL)
+ m = re.search(self.CAPTCHA_DIV_PATTERN, self.html, re.S)
if m:
captcha_div = m.group(1)
self.logDebug(captcha_div)