summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal/XFSHoster.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-08-04 18:06:42 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-08-04 18:06:42 +0200
commit2cf928db10224b5327f918dceaa13273753620ac (patch)
tree2bf7d443308198f170c2b9eff137099467648059 /module/plugins/internal/XFSHoster.py
parentMerge pull request #1696 from Gutz-Pilz/patch-4 (diff)
downloadpyload-2cf928db10224b5327f918dceaa13273753620ac.tar.xz
Some fixes
Diffstat (limited to 'module/plugins/internal/XFSHoster.py')
-rw-r--r--module/plugins/internal/XFSHoster.py9
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+/).+?)["\'<])'