diff options
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} |