summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal
diff options
context:
space:
mode:
authorGravatar Stefano <l.stickell@yahoo.it> 2013-10-08 16:38:11 +0200
committerGravatar Stefano <l.stickell@yahoo.it> 2013-10-08 16:38:11 +0200
commitda499334b36eb1b9de871ac7ee926f4a1cae82a6 (patch)
tree53f93ebc0210e3a8567051dd9aa65431bf92497f /module/plugins/internal
parentKeep2share: improved offline pattern (diff)
downloadpyload-da499334b36eb1b9de871ac7ee926f4a1cae82a6.tar.xz
SimpleHoster: workaround load cookies 0.4.9 bug
Diffstat (limited to 'module/plugins/internal')
-rw-r--r--module/plugins/internal/SimpleHoster.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py
index 67505f41a..640d129b8 100644
--- a/module/plugins/internal/SimpleHoster.py
+++ b/module/plugins/internal/SimpleHoster.py
@@ -146,7 +146,7 @@ class PluginParseError(Exception):
class SimpleHoster(Hoster):
__name__ = "SimpleHoster"
- __version__ = "0.28"
+ __version__ = "0.29"
__pattern__ = None
__type__ = "hoster"
__description__ = """Base hoster plugin"""
@@ -180,7 +180,9 @@ class SimpleHoster(Hoster):
def process(self, pyfile):
pyfile.url = replace_patterns(pyfile.url, self.FILE_URL_REPLACEMENTS)
self.req.setOption("timeout", 120)
- self.html = self.load(pyfile.url, decode = not self.SH_BROKEN_ENCODING, cookies = self.SH_COOKIES)
+ # Due to a 0.4.9 core bug self.load would keep previous cookies even if overridden by cookies parameter.
+ # Workaround using getURL. Can be reverted in 0.5 as the cookies bug has been fixed.
+ self.html = getURL(pyfile.url, decode=not self.SH_BROKEN_ENCODING, cookies=self.SH_COOKIES)
self.getFileInfo()
if self.premium and (not self.SH_CHECK_TRAFFIC or self.checkTrafficLeft()):
self.handlePremium()