diff options
author | 2014-10-05 13:32:36 +0200 | |
---|---|---|
committer | 2014-10-05 13:32:36 +0200 | |
commit | d1e2da48ff1158c84bab62aba3e62ff16f24f124 (patch) | |
tree | 14c2b461b84ab1c07ab39fbe3a80aa69c7b4c8ef /pyload/plugins/hoster/DlFreeFr.py | |
parent | Fix refs on hook plugins + add missing __init__ files (diff) | |
parent | Remove old Ev0InFetcher hook (diff) | |
download | pyload-d1e2da48ff1158c84bab62aba3e62ff16f24f124.tar.xz |
Merge branch 'stable' into 0.4.10
Conflicts:
module/plugins/internal/CaptchaService.py
pyload/plugins/account/CyberlockerCh.py
pyload/plugins/account/EgoFilesCom.py
pyload/plugins/account/HotfileCom.py
pyload/plugins/crypter/HotfileFolderCom.py
pyload/plugins/crypter/LinkSaveIn.py
pyload/plugins/crypter/OneKhDe.py
pyload/plugins/hoster/EgoFilesCom.py
pyload/plugins/internal/XFSPAccount.py
Diffstat (limited to 'pyload/plugins/hoster/DlFreeFr.py')
-rw-r--r-- | pyload/plugins/hoster/DlFreeFr.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/pyload/plugins/hoster/DlFreeFr.py b/pyload/plugins/hoster/DlFreeFr.py index 0365754bc..1e256368c 100644 --- a/pyload/plugins/hoster/DlFreeFr.py +++ b/pyload/plugins/hoster/DlFreeFr.py @@ -40,10 +40,12 @@ class AdYouLike: ADYOULIKE_CALLBACK = r'Adyoulike.g._jsonp_5579316662423138' ADYOULIKE_CHALLENGE_PATTERN = ADYOULIKE_CALLBACK + r'\((.*?)\)' + def __init__(self, plugin, engine="adyoulike"): self.plugin = plugin self.engine = engine + def challenge(self, html): adyoulike_data_string = None m = re.search(self.ADYOULIKE_INPUT_PATTERN, html) @@ -71,6 +73,7 @@ class AdYouLike: return ayl_data, challenge_data + def result(self, ayl, challenge): """ Adyoulike.g._jsonp_5579316662423138 @@ -117,6 +120,7 @@ class DlFreeFr(SimpleHoster): __author_name__ = ("the-razer", "zoidberg", "Toilal") __author_mail__ = ("daniel_ AT gmx DOT net", "zoidberg@mujmail.cz", "toilal.dev@gmail.com") + FILE_NAME_PATTERN = r'Fichier:</td>\s*<td[^>]*>(?P<N>[^>]*)</td>' FILE_SIZE_PATTERN = r'Taille:</td>\s*<td[^>]*>(?P<S>[\d.]+[KMG])o' OFFLINE_PATTERN = r"Erreur 404 - Document non trouv|Fichier inexistant|Le fichier demandé n'a pas été trouvé" @@ -127,13 +131,13 @@ class DlFreeFr(SimpleHoster): self.limitDL = 5 self.chunkLimit = 1 + def init(self): factory = self.core.requestFactory self.req = CustomBrowser(factory.bucket, factory.getOptions()) - def process(self, pyfile): - self.req.setCookieJar(None) + def process(self, pyfile): pyfile.url = replace_patterns(pyfile.url, self.FILE_URL_REPLACEMENTS) valid_url = pyfile.url headers = self.load(valid_url, just_header=True) @@ -157,6 +161,7 @@ class DlFreeFr(SimpleHoster): else: self.fail("Invalid return code: " + str(headers.get('code'))) + def handleFree(self): action, inputs = self.parseHtmlForm('action="getfile.pl"') @@ -180,6 +185,7 @@ class DlFreeFr(SimpleHoster): else: self.fail("Invalid response") + def getLastHeaders(self): #parse header header = {"code": self.req.code} |