summaryrefslogtreecommitdiffstats
path: root/module/plugins
diff options
context:
space:
mode:
authorGravatar zapp-brannigan <zapp-brannigan@users.noreply.github.com> 2014-10-22 10:11:51 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-22 10:11:51 +0200
commitf7b87385de7bb559422c5da1f9ef2ef768a6355b (patch)
treed154b8e9b6b5290e046934a1665a21de193c6b26 /module/plugins
parentMerge pull request #813 from eerozeteen/patch-1 (diff)
downloadpyload-f7b87385de7bb559422c5da1f9ef2ef768a6355b.tar.xz
LoadTo.py] Improve checkDownload
Sometimes, files are not downloaded properly. You receive a html-page instead of the desired file. It happens mostly on small files, but it isn't reproducable. Restarting the link solves the issue.
Diffstat (limited to 'module/plugins')
-rw-r--r--module/plugins/hoster/LoadTo.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/module/plugins/hoster/LoadTo.py b/module/plugins/hoster/LoadTo.py
index 6f1fdb575..a28428b73 100644
--- a/module/plugins/hoster/LoadTo.py
+++ b/module/plugins/hoster/LoadTo.py
@@ -13,7 +13,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class LoadTo(SimpleHoster):
__name__ = "LoadTo"
__type__ = "hoster"
- __version__ = "0.17"
+ __version__ = "0.18"
__pattern__ = r'http://(?:www\.)?load\.to/\w+'
@@ -60,11 +60,14 @@ class LoadTo(SimpleHoster):
else:
captcha_challenge, captcha_response = solvemedia.challenge(captcha_key)
self.download(download_url, post={"adcopy_challenge": captcha_challenge, "adcopy_response": captcha_response})
- check = self.checkDownload({"404": re.compile("\A<h1>404 Not Found</h1>")})
+ check = self.checkDownload({'404': re.compile("\A<h1>404 Not Found</h1>"), 'html': re.compile("html")})
if check == "404":
self.logWarning("The captcha you entered was incorrect. Please try again.")
self.invalidCaptcha()
self.retry()
+ elif check == "html":
+ self.logWarning("Downloaded file is an html page, will retry")
+ self.retry()
getInfo = create_getInfo(LoadTo)