summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-06-09 14:27:17 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-06-09 14:27:17 +0200
commit6faa98072d3bae3d3f2cbf5f7dfa2c9de61da87e (patch)
tree6b6157bb7b699a896ed6acd129d7af9cf3421b11 /module
parentFix https://github.com/pyload/pyload/issues/1472 (diff)
downloadpyload-6faa98072d3bae3d3f2cbf5f7dfa2c9de61da87e.tar.xz
[SimpleHoster] preload referer to False
Diffstat (limited to 'module')
-rw-r--r--module/plugins/hoster/UploadedTo.py8
-rw-r--r--module/plugins/internal/SimpleHoster.py4
2 files changed, 4 insertions, 8 deletions
diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py
index 187653c2d..cb8440687 100644
--- a/module/plugins/hoster/UploadedTo.py
+++ b/module/plugins/hoster/UploadedTo.py
@@ -32,6 +32,7 @@ class UploadedTo(SimpleHoster):
OFFLINE_PATTERN = r'>Page not found'
TEMP_OFFLINE_PATTERN = r'<title>uploaded\.net - Maintenance'
+ LINK_FREE_PATTERN = r"url:\s*'(.+?)'"
LINK_PREMIUM_PATTERN = r'<div class="tfree".*\s*<form method="post" action="(.+?)"'
WAIT_PATTERN = r'Current waiting period: <span>(\d+)'
@@ -77,12 +78,7 @@ class UploadedTo(SimpleHoster):
post={'recaptcha_challenge_field': challenge,
'recaptcha_response_field' : response})
- if "type:'download'" in self.html:
- try:
- self.link = re.search("url:\s*'(.+?)'", self.html).group(1)
- except Exception:
- pass
-
+ super(UploadedTo, self).handleFree(pyfile)
self.checkErrors()
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py
index 49b29e280..25a35d9d8 100644
--- a/module/plugins/internal/SimpleHoster.py
+++ b/module/plugins/internal/SimpleHoster.py
@@ -241,7 +241,7 @@ def secondsToMidnight(gmt=0):
class SimpleHoster(Hoster):
__name__ = "SimpleHoster"
__type__ = "hoster"
- __version__ = "1.65"
+ __version__ = "1.66"
__pattern__ = r'^unmatchable$'
__config__ = [("use_premium", "bool", "Use premium account if available" , True),
@@ -514,7 +514,7 @@ class SimpleHoster(Hoster):
def preload(self):
- self.html = self.load(self.pyfile.url, cookies=bool(self.COOKIES), decode=not self.TEXT_ENCODING)
+ self.html = self.load(self.pyfile.url, cookies=bool(self.COOKIES), ref=False, decode=not self.TEXT_ENCODING)
if isinstance(self.TEXT_ENCODING, basestring):
self.html = unicode(self.html, self.TEXT_ENCODING)