summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/FourSharedCom.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-07-10 03:02:26 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-07-10 03:02:26 +0200
commit04038a2cf0c4c2d9cc9a0c8e8bf9beb6426afae8 (patch)
tree703010e32f62bf869551ce0d323dacf62bc448ff /module/plugins/hoster/FourSharedCom.py
parent[SimpleCrypter] Support parseError (diff)
downloadpyload-04038a2cf0c4c2d9cc9a0c8e8bf9beb6426afae8.tar.xz
Use parseError instead PluginParseError + unified all download pattern attributes as LINK_PATTERN + removed some old patterns (not used anymore) + other code cosmetics
Diffstat (limited to 'module/plugins/hoster/FourSharedCom.py')
-rw-r--r--module/plugins/hoster/FourSharedCom.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/module/plugins/hoster/FourSharedCom.py b/module/plugins/hoster/FourSharedCom.py
index 9b8b3b1f0..93d784d63 100644
--- a/module/plugins/hoster/FourSharedCom.py
+++ b/module/plugins/hoster/FourSharedCom.py
@@ -15,14 +15,16 @@ class FourSharedCom(SimpleHoster):
__author_mail__ = ("jeix@hasnomail.de", "zoidberg@mujmail.cz")
FILE_NAME_PATTERN = r'<meta name="title" content="(?P<N>.+?)"'
- FILE_SIZE_PATTERN = '<span title="Size: (?P<S>[0-9,.]+) (?P<U>[kKMG])i?B">'
- OFFLINE_PATTERN = 'The file link that you requested is not valid\.|This file was deleted.'
+ FILE_SIZE_PATTERN = r'<span title="Size: (?P<S>[0-9,.]+) (?P<U>[kKMG])i?B">'
+ OFFLINE_PATTERN = r'The file link that you requested is not valid\.|This file was deleted.'
+
FILE_NAME_REPLACEMENTS = [(r"&#(\d+).", lambda m: unichr(int(m.group(1))))]
FILE_SIZE_REPLACEMENTS = [(",", "")]
- DOWNLOAD_BUTTON_PATTERN = 'id="btnLink" href="(.*?)"'
- FID_PATTERN = 'name="d3fid" value="(.*?)"'
DOWNLOAD_URL_PATTERN = r'name="d3link" value="(.*?)"'
+ DOWNLOAD_BUTTON_PATTERN = r'id="btnLink" href="(.*?)"'
+ FID_PATTERN = r'name="d3fid" value="(.*?)"'
+
def handleFree(self):
if not self.account: