From 57b9320a21f981b8f7e47885b0901ea5ace39237 Mon Sep 17 00:00:00 2001 From: GammaC0de Date: Tue, 15 Dec 2015 02:49:11 +0200 Subject: [OneFichierCom] fix #2193 --- module/plugins/hoster/OneFichierCom.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'module/plugins/hoster/OneFichierCom.py') diff --git a/module/plugins/hoster/OneFichierCom.py b/module/plugins/hoster/OneFichierCom.py index b657fe484..53ebaa759 100644 --- a/module/plugins/hoster/OneFichierCom.py +++ b/module/plugins/hoster/OneFichierCom.py @@ -9,10 +9,10 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class OneFichierCom(SimpleHoster): __name__ = "OneFichierCom" __type__ = "hoster" - __version__ = "0.95" + __version__ = "0.96" __status__ = "testing" - __pattern__ = r'https?://(?:www\.)?(?:\w+\.)?(?P1fichier\.com|alterupload\.com|cjoint\.net|d(es)?fichiers\.com|dl4free\.com|megadl\.fr|mesfichiers\.org|piecejointe\.net|pjointe\.com|tenvoi\.com)(?:/\?\w+)?' + __pattern__ = r'https?://(?:www\.)?(?:\w+\.)?(?P1fichier\.com|alterupload\.com|cjoint\.net|d(?:es)?fichiers\.com|dl4free\.com|megadl\.fr|mesfichiers\.org|piecejointe\.net|pjointe\.com|tenvoi\.com)(?:/\?\w+)?' __config__ = [("activated" , "bool", "Activated" , True), ("use_premium" , "bool", "Use premium account if available" , True), ("fallback" , "bool", "Fallback to free download if premium fails" , True), @@ -28,7 +28,8 @@ class OneFichierCom(SimpleHoster): ("stickell", "l.stickell@yahoo.it"), ("Elrick69", "elrick69[AT]rocketmail[DOT]com"), ("Walter Purcaro", "vuolter@gmail.com"), - ("Ludovic Lehmann", "ludo.lehmann@gmail.com")] + ("Ludovic Lehmann", "ludo.lehmann@gmail.com"), + ("GammaC0de", "nitzo2001[AT]yahoo[DOT]com")] URL_REPLACEMENTS = [("https:", "http:")] #@TODO: Remove in 0.4.10 @@ -41,9 +42,8 @@ class OneFichierCom(SimpleHoster): WAIT_PATTERN = r'>You must wait \d+ minutes' - def setup(self): - self.multiDL = self.premium + self.multiDL = self.premium self.resume_download = True @@ -96,11 +96,11 @@ class OneFichierCom(SimpleHoster): inputs['submit'] = "Download" - self.download(url, post=inputs) + self.download(url, post=inputs, disposition=False) #@TODO: Remove disposition in 0.4.10 def handle_premium(self, pyfile): - self.download(pyfile.url, post={'did': 0, 'dl_no_ssl': "on"}) + self.download(pyfile.url, post={'did': 0, 'dl_no_ssl': "on"}, disposition=False) #@TODO: Remove disposition in 0.4.10 getInfo = create_getInfo(OneFichierCom) -- cgit v1.2.3 From 95834c1f3cecff658f8ece24b3196377cebd1b7f Mon Sep 17 00:00:00 2001 From: Richard Lindner Date: Sun, 20 Dec 2015 08:52:30 +0100 Subject: Fix: OneFichier free download had a new link to follow --- module/plugins/hoster/OneFichierCom.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'module/plugins/hoster/OneFichierCom.py') diff --git a/module/plugins/hoster/OneFichierCom.py b/module/plugins/hoster/OneFichierCom.py index 53ebaa759..bd3a44bf5 100644 --- a/module/plugins/hoster/OneFichierCom.py +++ b/module/plugins/hoster/OneFichierCom.py @@ -96,7 +96,14 @@ class OneFichierCom(SimpleHoster): inputs['submit'] = "Download" - self.download(url, post=inputs, disposition=False) #@TODO: Remove disposition in 0.4.10 + self.data = self.load(url, post=inputs) + match = re.search(r'Click here to download the file', self.data) + if match: + url = match.group(1) + self.download(url) + else: + self.log_error("Could not find download link") + def handle_premium(self, pyfile): -- cgit v1.2.3 From dea05ac7a4cd2bddcf2ce8311601dbd1f9add010 Mon Sep 17 00:00:00 2001 From: Richard Lindner Date: Sun, 20 Dec 2015 09:13:22 +0100 Subject: Same fix better implementation --- module/plugins/hoster/OneFichierCom.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'module/plugins/hoster/OneFichierCom.py') diff --git a/module/plugins/hoster/OneFichierCom.py b/module/plugins/hoster/OneFichierCom.py index bd3a44bf5..a40278477 100644 --- a/module/plugins/hoster/OneFichierCom.py +++ b/module/plugins/hoster/OneFichierCom.py @@ -41,6 +41,7 @@ class OneFichierCom(SimpleHoster): OFFLINE_PATTERN = r'File not found !\s*<' WAIT_PATTERN = r'>You must wait \d+ minutes' + LINK_FREE_PATTERN = r'Click here to download the file' def setup(self): self.multiDL = self.premium @@ -97,13 +98,7 @@ class OneFichierCom(SimpleHoster): inputs['submit'] = "Download" self.data = self.load(url, post=inputs) - match = re.search(r'Click here to download the file', self.data) - if match: - url = match.group(1) - self.download(url) - else: - self.log_error("Could not find download link") - + return super(OneFichierCom, self).handle_free(pyfile) def handle_premium(self, pyfile): -- cgit v1.2.3 From 0837578fa037fe96ecb292221da7cd777e5e03c4 Mon Sep 17 00:00:00 2001 From: GammaC0de Date: Sun, 20 Dec 2015 16:29:21 +0200 Subject: [OneFichierCom] fix #2196 --- module/plugins/hoster/OneFichierCom.py | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'module/plugins/hoster/OneFichierCom.py') diff --git a/module/plugins/hoster/OneFichierCom.py b/module/plugins/hoster/OneFichierCom.py index a40278477..ef6f49da3 100644 --- a/module/plugins/hoster/OneFichierCom.py +++ b/module/plugins/hoster/OneFichierCom.py @@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class OneFichierCom(SimpleHoster): __name__ = "OneFichierCom" __type__ = "hoster" - __version__ = "0.96" + __version__ = "0.97" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?(?:\w+\.)?(?P1fichier\.com|alterupload\.com|cjoint\.net|d(?:es)?fichiers\.com|dl4free\.com|megadl\.fr|mesfichiers\.org|piecejointe\.net|pjointe\.com|tenvoi\.com)(?:/\?\w+)?' @@ -31,17 +31,18 @@ class OneFichierCom(SimpleHoster): ("Ludovic Lehmann", "ludo.lehmann@gmail.com"), ("GammaC0de", "nitzo2001[AT]yahoo[DOT]com")] + DISPOSITION = False #@TODO: Remove disposition in 0.4.10 URL_REPLACEMENTS = [("https:", "http:")] #@TODO: Remove in 0.4.10 - COOKIES = [("1fichier.com", "LG", "en")] + COOKIES = [("1fichier.com", "LG", "en")] - NAME_PATTERN = r'>File\s*Name :\s*(?P.+?)<' - SIZE_PATTERN = r'>Size :\s*(?P[\d.,]+) (?P[\w^_]+)' - OFFLINE_PATTERN = r'File not found !\s*<' + NAME_PATTERN = r'>File\s*Name :\s*(?P.+?)<' + SIZE_PATTERN = r'>Size :\s*(?P[\d.,]+) (?P[\w^_]+)' + OFFLINE_PATTERN = r'File not found !\s*<' + LINK_PATTERN = r'Click here to download the file' - WAIT_PATTERN = r'>You must wait \d+ minutes' - LINK_FREE_PATTERN = r'Click here to download the file' + WAIT_PATTERN = r'>You must wait \d+ minutes' def setup(self): self.multiDL = self.premium @@ -53,7 +54,7 @@ class OneFichierCom(SimpleHoster): redirect = url for i in xrange(10): try: - headers = dict(re.findall(r"(?P.+?): (?P.+?)\r?\n", get_url(redirect, just_header=True).lower())) + headers = dict((k.lower(), v) for k,v in re.findall(r"(?P.+?): (?P.+?)\r?\n", get_url(redirect, just_header=True))) if 'location' in headers and headers['location']: redirect = headers['location'] else: @@ -95,14 +96,16 @@ class OneFichierCom(SimpleHoster): if "pass" in inputs: inputs['pass'] = self.get_password() - inputs['submit'] = "Download" + inputs['dl_no_ssl'] = "on" - self.data = self.load(url, post=inputs) - return super(OneFichierCom, self).handle_free(pyfile) + self.data=self.load(url, post=inputs) + + m = re.search(self.LINK_PATTERN, self.data) + if m: + self.link = m.group(1) def handle_premium(self, pyfile): self.download(pyfile.url, post={'did': 0, 'dl_no_ssl': "on"}, disposition=False) #@TODO: Remove disposition in 0.4.10 -getInfo = create_getInfo(OneFichierCom) -- cgit v1.2.3