diff options
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r-- | module/plugins/hoster/DlFreeFr.py | 29 | ||||
-rw-r--r-- | module/plugins/hoster/EasybytezCom.py | 4 | ||||
-rw-r--r-- | module/plugins/hoster/LetitbitNet.py | 5 |
3 files changed, 27 insertions, 11 deletions
diff --git a/module/plugins/hoster/DlFreeFr.py b/module/plugins/hoster/DlFreeFr.py index 138d0e056..a8b5eb3e8 100644 --- a/module/plugins/hoster/DlFreeFr.py +++ b/module/plugins/hoster/DlFreeFr.py @@ -3,20 +3,23 @@ import re from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.ReCaptcha import ReCaptcha class DlFreeFr(SimpleHoster): __name__ = "DlFreeFr" __type__ = "hoster" - __pattern__ = r"http://dl\.free\.fr/([a-zA-Z0-9]+|getfile\.pl\?file=/[a-zA-Z0-9]+)$" - __version__ = "0.2" + __pattern__ = r"http://dl\.free\.fr/([a-zA-Z0-9]+|getfile\.pl\?file=/[a-zA-Z0-9]+)" + __version__ = "0.21" __description__ = """dl.free.fr download hoster""" __author_name__ = ("the-razer", "zoidberg") __author_mail__ = ("daniel_ AT gmx DOT net", "zoidberg@mujmail.cz") FILE_NAME_PATTERN = r"Fichier:</td>\s*<td[^>]*>(?P<N>[^>]*)</td>" - FILE_SIZE_PATTERN = r"Taille:</td>\s*<td[^>]*>(?P<S>[\d.]+[KMG])</td>" + FILE_SIZE_PATTERN = r"Taille:</td>\s*<td[^>]*>(?P<S>[\d.]+[KMG])o" FILE_OFFLINE_PATTERN = r"Erreur 404 - Document non trouv|Fichier inexistant|Le fichier demandé n'a pas été trouvé" - FILE_URL_PATTERN = r'href="(?P<url>http://.*?)">Télécharger ce fichier' + #FILE_URL_PATTERN = r'href="(?P<url>http://.*?)">Télécharger ce fichier' + + RECAPTCHA_KEY_PATTERN = r'"recaptcha":{"key":"(.*?)"}' def setup(self): self.multiDL = True @@ -27,12 +30,20 @@ class DlFreeFr(SimpleHoster): def handleFree(self): if "Trop de slots utilisés" in self.html: self.retry(300) + + recaptcha_key = '6Lf-Ws8SAAAAAAO4ND_KCqpZzNZQKYEuOROs4edG' + found = re.search(self.RECAPTCHA_KEY_PATTERN, self.html) + if found: recaptcha_key = found.group(1) + + action, inputs = self.parseHtmlForm('action="getfile.pl"') + inputs.update( {"_ayl_captcha_engine" : "recaptcha", + "_ayl_env" : "prod", + "_ayl_tid" : "undefined", + "_ayl_token_challenge" : "undefined"} ) - m = re.search(self.FILE_URL_PATTERN, self.html) - if not m: self.parseError('URL') + recaptcha = ReCaptcha(self) + inputs['recaptcha_challenge_field'], inputs['recaptcha_response_field'] = recaptcha.challenge(recaptcha_key) - url = m.group('url') - self.logDebug("File URL [%s]" % url) - self.download(url) + self.download("http://dl.free.fr/getfile.pl", post = inputs) getInfo = create_getInfo(DlFreeFr)
\ No newline at end of file diff --git a/module/plugins/hoster/EasybytezCom.py b/module/plugins/hoster/EasybytezCom.py index 25de9b341..684349b51 100644 --- a/module/plugins/hoster/EasybytezCom.py +++ b/module/plugins/hoster/EasybytezCom.py @@ -16,13 +16,15 @@ @author: zoidberg """ +import re +from random import random from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInfo class EasybytezCom(XFileSharingPro): __name__ = "EasybytezCom" __type__ = "hoster" __pattern__ = r"http://(?:\w*\.)?easybytez.com/(\w+).*" - __version__ = "0.06" + __version__ = "0.07" __description__ = """easybytez.com""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") diff --git a/module/plugins/hoster/LetitbitNet.py b/module/plugins/hoster/LetitbitNet.py index 003502f75..bf66609eb 100644 --- a/module/plugins/hoster/LetitbitNet.py +++ b/module/plugins/hoster/LetitbitNet.py @@ -25,7 +25,7 @@ class LetitbitNet(SimpleHoster): __name__ = "LetitbitNet" __type__ = "hoster" __pattern__ = r"http://(?:\w*\.)*letitbit.net/download/.*" - __version__ = "0.17" + __version__ = "0.18" __description__ = """letitbit.net""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") @@ -37,6 +37,9 @@ class LetitbitNet(SimpleHoster): FILE_OFFLINE_PATTERN = r'>File not found<' DOMAIN = "http://letitbit.net" + + def setup(self): + self.resumeDownload = self.multiDL = True def handleFree(self): action, inputs = self.parseHtmlForm('id="ifree_form"') |