diff options
author | Stefano <l.stickell@yahoo.it> | 2013-10-08 16:38:11 +0200 |
---|---|---|
committer | Stefano <l.stickell@yahoo.it> | 2013-10-09 17:02:08 +0200 |
commit | 66fb6110b4f41d897c60bf80ecc7afd12c216319 (patch) | |
tree | 8839fefd8e1630d49970e45026b101819e598efb /pyload/plugins/internal | |
parent | Keep2share: improved offline pattern (diff) | |
download | pyload-66fb6110b4f41d897c60bf80ecc7afd12c216319.tar.xz |
SimpleHoster: workaround load cookies 0.4.9 bug
See also ecb3e1cf7733d6f217082abcbe41c0e07dc522da
(cherry picked from commit da499334b36eb1b9de871ac7ee926f4a1cae82a6)
Diffstat (limited to 'pyload/plugins/internal')
-rw-r--r-- | pyload/plugins/internal/SimpleHoster.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pyload/plugins/internal/SimpleHoster.py b/pyload/plugins/internal/SimpleHoster.py index 5cb019abb..745cbfd8f 100644 --- a/pyload/plugins/internal/SimpleHoster.py +++ b/pyload/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() |