summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/OneFichierCom.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hoster/OneFichierCom.py')
-rw-r--r--module/plugins/hoster/OneFichierCom.py22
1 files changed, 12 insertions, 10 deletions
diff --git a/module/plugins/hoster/OneFichierCom.py b/module/plugins/hoster/OneFichierCom.py
index f0e16a101..4b947c554 100644
--- a/module/plugins/hoster/OneFichierCom.py
+++ b/module/plugins/hoster/OneFichierCom.py
@@ -8,9 +8,10 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class OneFichierCom(SimpleHoster):
__name__ = "OneFichierCom"
__type__ = "hoster"
- __version__ = "0.75"
+ __version__ = "0.84"
__pattern__ = r'https?://(?:www\.)?(?:(?P<ID1>\w+)\.)?(?P<HOST>1fichier\.com|alterupload\.com|cjoint\.net|d(es)?fichiers\.com|dl4free\.com|megadl\.fr|mesfichiers\.org|piecejointe\.net|pjointe\.com|tenvoi\.com)(?:/\?(?P<ID2>\w+))?'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """1fichier.com hoster plugin"""
__license__ = "GPLv3"
@@ -20,17 +21,18 @@ class OneFichierCom(SimpleHoster):
("imclem", None),
("stickell", "l.stickell@yahoo.it"),
("Elrick69", "elrick69[AT]rocketmail[DOT]com"),
- ("Walter Purcaro", "vuolter@gmail.com")]
+ ("Walter Purcaro", "vuolter@gmail.com"),
+ ("Ludovic Lehmann", "ludo.lehmann@gmail.com")]
- NAME_PATTERN = r'>FileName :</td>\s*<td.*>(?P<N>.+?)<'
- SIZE_PATTERN = r'>Size :</td>\s*<td.*>(?P<S>[\d.,]+) (?P<U>[\w^_]+)'
+ COOKIES = [("1fichier.com", "LG", "en")]
+ DISPOSITION = False #: Remove in 0.4.10
+ 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*<'
- COOKIES = [("1fichier.com", "LG", "en")]
-
- WAIT_PATTERN = r'>You must wait (\d+) minutes'
+ WAIT_PATTERN = r'>You must wait \d+ minutes'
def setup(self):
@@ -38,7 +40,7 @@ class OneFichierCom(SimpleHoster):
self.resumeDownload = True
- def handleFree(self):
+ def handleFree(self, pyfile):
id = self.info['pattern']['ID1'] or self.info['pattern']['ID2']
url, inputs = self.parseHtmlForm('action="https://1fichier.com/\?%s' % id)
@@ -53,8 +55,8 @@ class OneFichierCom(SimpleHoster):
self.download(url, post=inputs)
- def handlePremium(self):
- return self.handleFree()
+ def handlePremium(self, pyfile):
+ self.download(pyfile.url, post={'dl': "Download", 'did': 0})
getInfo = create_getInfo(OneFichierCom)