summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/LoadTo.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-04-10 14:36:59 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-04-10 14:36:59 +0200
commit1e6846b3c435b0d71be83670d09bd019a84823ec (patch)
treee7a93e2a5583e50a1a6a8bff4ac1b84e4a230782 /module/plugins/hoster/LoadTo.py
parent[SimpleHoster] Fix https://github.com/pyload/pyload/issues/1341 (diff)
downloadpyload-1e6846b3c435b0d71be83670d09bd019a84823ec.tar.xz
Spare code cosmetics
Diffstat (limited to 'module/plugins/hoster/LoadTo.py')
-rw-r--r--module/plugins/hoster/LoadTo.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/module/plugins/hoster/LoadTo.py b/module/plugins/hoster/LoadTo.py
index 8f4f8808c..2b4202051 100644
--- a/module/plugins/hoster/LoadTo.py
+++ b/module/plugins/hoster/LoadTo.py
@@ -45,7 +45,7 @@ class LoadTo(SimpleHoster):
if m is None:
self.error(_("LINK_FREE_PATTERN not found"))
- download_url = m.group(1)
+ self.link = m.group(1)
# Set Timer - may be obsolete
m = re.search(self.WAIT_PATTERN, self.html)
@@ -56,11 +56,9 @@ class LoadTo(SimpleHoster):
solvemedia = SolveMedia(self)
captcha_key = solvemedia.detect_key()
- if captcha_key is None:
- self.download(download_url)
- else:
+ if captcha_key:
response, challenge = solvemedia.challenge(captcha_key)
- self.download(download_url,
+ self.download(self.link,
post={'adcopy_challenge': challenge,
'adcopy_response' : response,
'returnUrl' : pyfile.url})