# -*- coding: utf-8 -*- from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class DlFreeFr(SimpleHoster): __name__ = "DlFreeFr" __type__ = "hoster" __version__ = "0.34" __status__ = "testing" __pattern__ = r'http://(?:www\.)?dl\.free\.fr/(getfile\.pl\?file=/|[a-z])(?P\w+)' __config__ = [("activated" , "bool", "Activated" , True), ("use_premium", "bool", "Use premium account if available", True)] __description__ = """Dl.free.fr hoster plugin""" __license__ = "GPLv3" __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] NAME_PATTERN = r'Fichier:\s*(?P[^>]*)' SIZE_PATTERN = r'Taille:\s*(?P[\d.,]+)(?P\w+)' OFFLINE_PATTERN = r'>ERREUR 404|Fichier inexistant' def setup(self): self.resume_download = True self.multiDL = True self.limitDL = 5 self.chunk_limit = 1 def handle_free(self, pyfile): self.download("http://dl.free.fr/getfile.pl", post={'file': '/' + self.info['pattern']['ID'], 'send': "Valider+et+télécharger+le+fichier"}) getInfo = create_getInfo(DlFreeFr)