summaryrefslogtreecommitdiffstats
path: root/module/plugins
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-04 01:08:43 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-04 01:08:43 +0100
commit04e18c8c3c286ed4feaac5cc9b016639adc01ed3 (patch)
tree0a88262e164a7369235259308b679b8d2edacbc5 /module/plugins
parent[OneFichier] Plugin update (diff)
downloadpyload-04e18c8c3c286ed4feaac5cc9b016639adc01ed3.tar.xz
[OneFichierCom] Fixed
Diffstat (limited to 'module/plugins')
-rw-r--r--module/plugins/hoster/OneFichierCom.py34
1 files changed, 10 insertions, 24 deletions
diff --git a/module/plugins/hoster/OneFichierCom.py b/module/plugins/hoster/OneFichierCom.py
index 4119a0903..e7ef5b08e 100644
--- a/module/plugins/hoster/OneFichierCom.py
+++ b/module/plugins/hoster/OneFichierCom.py
@@ -8,9 +8,9 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class OneFichierCom(SimpleHoster):
__name__ = "OneFichierCom"
__type__ = "hoster"
- __version__ = "0.66"
+ __version__ = "0.67"
- __pattern__ = r'https?://(?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)'
+ __pattern__ = r'https?://(?:www\.)?(?:(?P<ID1>\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)(?:/\?(?P<ID2>\w+))?'
__description__ = """1fichier.com hoster plugin"""
__license__ = "GPLv3"
@@ -19,14 +19,15 @@ class OneFichierCom(SimpleHoster):
("zoidberg", "zoidberg@mujmail.cz"),
("imclem", None),
("stickell", "l.stickell@yahoo.it"),
- ("Elrick69", "elrick69[AT]rocketmail[DOT]com")]
+ ("Elrick69", "elrick69[AT]rocketmail[DOT]com"),
+ ("Walter Purcaro", "vuolter@gmail.com")]
NAME_PATTERN = r'>FileName :</td>\s*<td.*>(?P<N>.+?)<'
SIZE_PATTERN = r'>Size :</td>\s*<td.*>(?P<S>[\d.,]+) (?P<U>[\w^_]+)'
OFFLINE_PATTERN = r'File not found !\s*<'
- URL_REPLACEMENTS = [(__pattern__, r'http://\g<ID>.\g<HOST>/en/')]
+ COOKIES = [(".1fichier.com", "LG", "en")]
WAIT_PATTERN = r'>You must wait (\d+)'
@@ -44,38 +45,23 @@ class OneFichierCom(SimpleHoster):
self.wait(wait_time * 60, True)
self.retry()
- url, inputs = self.parseHtmlForm('action="http://1fichier.com/\?%s' % self.info['ID'])
- if not url:
- self.error(_("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()
+ return self.handlePremium()
def handlePremium(self):
- url, inputs = self.parseHtmlForm('action="http://1fichier.com/\?%s' % self.info['ID'])
+ id = self.info['ID1'] or self.info['ID2']
+ url, inputs = self.parseHtmlForm('action="https://1fichier.com/\?%s' % id)
+
if not url:
self.error(_("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.WAIT_PATTERN})
if check == "wait":
wait_time = int(self.lastcheck.group(1)) * 60