diff options
author | Thierry Merle <thierry.merle@free.fr> | 2014-11-15 07:14:06 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-11-15 17:24:23 +0100 |
commit | 7d8d0991e4d9848325692f8bbb81df00afe4e065 (patch) | |
tree | f64f81dfe7ae98efeea3381552264fca3c4fa391 /module/plugins/internal/SimpleHoster.py | |
parent | [Plugin] Fix typo (thx rlindner81) (diff) | |
download | pyload-7d8d0991e4d9848325692f8bbb81df00afe4e065.tar.xz |
[SimpleHoster][OneFichierCom] Fix issue #836 ('status': 3)
Diffstat (limited to 'module/plugins/internal/SimpleHoster.py')
-rw-r--r-- | module/plugins/internal/SimpleHoster.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index 2562f0af3..18df2de92 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -170,10 +170,9 @@ def create_getInfo(plugin): def getInfo(urls): for url in urls: if hasattr(plugin, "COOKIES") and isinstance(plugin.COOKIES, list): - cj = CookieJar(plugin.__name__) - set_cookies(cj, plugin.COOKIES) + set_cookies(plugin.req.cj, plugin.COOKIES) else: - cj = None + plugin.req.cj = None if hasattr(plugin, "URL_REPLACEMENTS"): url = replace_patterns(url, plugin.URL_REPLACEMENTS) @@ -182,11 +181,11 @@ def create_getInfo(plugin): url = replace_patterns(url, plugin.FILE_URL_REPLACEMENTS) if hasattr(plugin, "TEXT_ENCODING"): - html = getURL(url, cookies=bool(cj), decode=not plugin.TEXT_ENCODING) + html = plugin.load(url, decode=not plugin.TEXT_ENCODING, cookies=bool(plugin.COOKIES)) if isinstance(plugin.TEXT_ENCODING, basestring): html = unicode(html, plugin.TEXT_ENCODING) else: - html = getURL(url, cookies=bool(cj), decode=True) + html = plugin.load(url, decode=True, cookies=bool(plugin.COOKIES)) yield parseFileInfo(plugin, url, html) @@ -200,7 +199,7 @@ def timestamp(): class SimpleHoster(Hoster): __name__ = "SimpleHoster" __type__ = "hoster" - __version__ = "0.54" + __version__ = "0.55" __pattern__ = r'^unmatchable$' |