summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/OneFichierCom.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-09-07 23:40:50 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-09-14 10:58:42 +0200
commit887ad58e4c6c20b992311bbdf931bcd18e73d384 (patch)
treef31beb241bacca0bfea4c1acc4e9ace813755cef /module/plugins/hoster/OneFichierCom.py
parent[AccountManager] Fixed #733 (diff)
parent[File4safe] distributing LINK_PATTERN (diff)
downloadpyload-887ad58e4c6c20b992311bbdf931bcd18e73d384.tar.xz
Merge branch 'stable' into 0.4.10
Conflicts: module/plugins/Account.py module/plugins/AccountManager.py module/plugins/Hook.py module/plugins/OCR.py module/plugins/Plugin.py module/plugins/PluginManager.py module/plugins/ReCaptcha.py module/plugins/accounts/Ftp.py module/plugins/accounts/Http.py module/plugins/internal/MultiHoster.py module/plugins/ocr/GigasizeCom.py module/plugins/ocr/LinksaveIn.py module/plugins/ocr/NetloadIn.py module/plugins/ocr/ShareonlineBiz.py
Diffstat (limited to 'module/plugins/hoster/OneFichierCom.py')
-rw-r--r--module/plugins/hoster/OneFichierCom.py24
1 files changed, 14 insertions, 10 deletions
diff --git a/module/plugins/hoster/OneFichierCom.py b/module/plugins/hoster/OneFichierCom.py
index 41f3e4b11..0536f7185 100644
--- a/module/plugins/hoster/OneFichierCom.py
+++ b/module/plugins/hoster/OneFichierCom.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-
-# Test links (random.bin):
+#
+# Test links:
# http://5pnm24ltcw.1fichier.com/
import re
@@ -11,8 +11,10 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
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.61"
+
+ __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))/?'
+
__description__ = """1fichier.com hoster plugin"""
__author_name__ = ("fragonib", "the-razer", "zoidberg", "imclem", "stickell", "Elrick69")
__author_mail__ = ("fragonib[AT]yahoo[DOT]es", "daniel_ AT gmx DOT net", "zoidberg@mujmail.cz",
@@ -20,15 +22,16 @@ class OneFichierCom(SimpleHoster):
FILE_NAME_PATTERN = r'">Filename :</th>\s*<td>(?P<N>[^<]+)</td>'
FILE_SIZE_PATTERN = r'<th>Size :</th>\s*<td>(?P<S>[^<]+)</td>'
- FILE_OFFLINE_PATTERN = r'The (requested)? file (could not be found|has been deleted)'
+ OFFLINE_PATTERN = r'The (requested)? file (could not be found|has been deleted)'
FILE_URL_REPLACEMENTS = [(__pattern__, r'http://\g<id>.\g<host>/en/')]
- WAITING_PATTERN = "Warning ! Without premium status, you must wait between each downloads"
- NOT_PARALLEL = r"Warning ! Without premium status, you can download only one file at a time"
+ WAITING_PATTERN = r'Warning ! Without premium status, you must wait between each downloads'
+ NOT_PARALLEL = r'Warning ! Without premium status, you can download only one file at a time'
WAIT_TIME = 10 * 60 # Retry time between each free download
RETRY_TIME = 15 * 60 # Default retry time in seconds (if detected parallel download)
+
def setup(self):
self.multiDL = self.premium
self.resumeDownload = True
@@ -40,22 +43,22 @@ class OneFichierCom(SimpleHoster):
self.logInfo('You have to wait been each free download! Retrying in %d seconds.' % self.WAIT_TIME)
self.waitAndRetry(self.WAIT_TIME)
else: # detect parallel download
- found = re.search(self.NOT_PARALLEL, self.html)
- if found:
+ m = re.search(self.NOT_PARALLEL, self.html)
+ if m:
self.waitAndRetry(self.RETRY_TIME)
url, inputs = self.parseHtmlForm('action="http://%s' % self.file_info['id'])
if not url:
self.parseError("Download link not found")
- # Check for protection
+ # Check for protection
if "pass" in inputs:
inputs['pass'] = self.getPassword()
inputs['submit'] = "Download"
self.download(url, post=inputs)
- # Check download
+ # Check download
self.checkDownloadedFile()
def handlePremium(self):
@@ -83,4 +86,5 @@ class OneFichierCom(SimpleHoster):
self.retry()
+
getInfo = create_getInfo(OneFichierCom)