diff options
author | Elrick69 <elrick69@rocketmail.com> | 2014-04-30 11:36:24 +0200 |
---|---|---|
committer | Stefano <l.stickell@yahoo.it> | 2014-04-30 11:36:24 +0200 |
commit | 530f6a9c5e9977e11d6b673909dedfacf27d55ec (patch) | |
tree | 9ba5d3186c9f10faf8fc7dde2bd32514ccfb5c85 /module/plugins/hoster | |
parent | Uptobox: fixed #588 (diff) | |
download | pyload-530f6a9c5e9977e11d6b673909dedfacf27d55ec.tar.xz |
1Fichier: premium support
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r-- | module/plugins/hoster/OneFichierCom.py | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/module/plugins/hoster/OneFichierCom.py b/module/plugins/hoster/OneFichierCom.py index 39a5450fe..41f3e4b11 100644 --- a/module/plugins/hoster/OneFichierCom.py +++ b/module/plugins/hoster/OneFichierCom.py @@ -12,11 +12,11 @@ class OneFichierCom(SimpleHoster): __name__ = "OneFichierCom" __type__ = "hoster" __pattern__ = r'(http://(?P<id>\w+)\.(?P<host>(1fichier|d(es)?fichiers|pjointe)\.(com|fr|net|org)|(cjoint|mesfichiers|piecejointe|oi)\.(org|net)|tenvoi\.(com|org|net)|dl4free\.com|alterupload\.com|megadl.fr))/?' - __version__ = "0.60" + __version__ = "0.61" __description__ = """1fichier.com hoster plugin""" - __author_name__ = ("fragonib", "the-razer", "zoidberg", "imclem", "stickell") + __author_name__ = ("fragonib", "the-razer", "zoidberg", "imclem", "stickell", "Elrick69") __author_mail__ = ("fragonib[AT]yahoo[DOT]es", "daniel_ AT gmx DOT net", "zoidberg@mujmail.cz", - "imclem on github", "l.stickell@yahoo.it") + "imclem on github", "l.stickell@yahoo.it", "elrick69[AT]rocketmail[DOT]com") FILE_NAME_PATTERN = r'">Filename :</th>\s*<td>(?P<N>[^<]+)</td>' FILE_SIZE_PATTERN = r'<th>Size :</th>\s*<td>(?P<S>[^<]+)</td>' @@ -58,6 +58,21 @@ class OneFichierCom(SimpleHoster): # Check download self.checkDownloadedFile() + def handlePremium(self): + url, inputs = self.parseHtmlForm('action="http://%s' % self.file_info['id']) + if not url: + self.parseError("Download link not found") + + # Check for protection + if "pass" in inputs: + inputs['pass'] = self.getPassword() + inputs['submit'] = "Download" + + self.download(url, post=inputs) + + # Check download + self.checkDownloadedFile() + def checkDownloadedFile(self): check = self.checkDownload({"wait": self.WAITING_PATTERN}) if check == "wait": |