diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-08-04 18:06:42 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-08-04 18:06:42 +0200 |
commit | 2cf928db10224b5327f918dceaa13273753620ac (patch) | |
tree | 2bf7d443308198f170c2b9eff137099467648059 /module/plugins/internal/XFSHoster.py | |
parent | Merge pull request #1696 from Gutz-Pilz/patch-4 (diff) | |
download | pyload-2cf928db10224b5327f918dceaa13273753620ac.tar.xz |
Some fixes
Diffstat (limited to 'module/plugins/internal/XFSHoster.py')
-rw-r--r-- | module/plugins/internal/XFSHoster.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/module/plugins/internal/XFSHoster.py b/module/plugins/internal/XFSHoster.py index 962cffb06..715ef93ca 100644 --- a/module/plugins/internal/XFSHoster.py +++ b/module/plugins/internal/XFSHoster.py @@ -13,7 +13,7 @@ from module.utils import html_unescape class XFSHoster(SimpleHoster): __name__ = "XFSHoster" __type__ = "hoster" - __version__ = "0.55" + __version__ = "0.56" __status__ = "testing" __pattern__ = r'^unmatchable$' @@ -71,8 +71,11 @@ class XFSHoster(SimpleHoster): else: self.fail(_("Missing HOSTER_DOMAIN")) - if isinstance(self.COOKIES, list): - self.COOKIES.insert((self.HOSTER_DOMAIN, "lang", "english")) + if self.COOKIES: + if isinstance(self.COOKIES, list) and not self.COOKIES.count((self.HOSTER_DOMAIN, "lang", "english")): + self.COOKIES.insert((self.HOSTER_DOMAIN, "lang", "english")) + else: + set_cookie(self.req.cj, self.HOSTER_DOMAIN, "lang", "english") if not self.LINK_PATTERN: pattern = r'(?:file: "(.+?)"|(https?://(?:www\.)?([^/]*?%s|\d+\.\d+\.\d+\.\d+)(\:\d+)?(/d/|(/files)?/\d+/\w+/).+?)["\'<])' |