diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-07-10 03:02:26 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-07-10 03:02:26 +0200 |
commit | 04038a2cf0c4c2d9cc9a0c8e8bf9beb6426afae8 (patch) | |
tree | 703010e32f62bf869551ce0d323dacf62bc448ff /module/plugins/hoster/FshareVn.py | |
parent | [SimpleCrypter] Support parseError (diff) | |
download | pyload-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/FshareVn.py')
-rw-r--r-- | module/plugins/hoster/FshareVn.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/module/plugins/hoster/FshareVn.py b/module/plugins/hoster/FshareVn.py index 63cc69161..75b37b4c3 100644 --- a/module/plugins/hoster/FshareVn.py +++ b/module/plugins/hoster/FshareVn.py @@ -34,11 +34,13 @@ class FshareVn(SimpleHoster): FILE_INFO_PATTERN = r'<p>(?P<N>[^<]+)<\\/p>[\\trn\s]*<p>(?P<S>[0-9,.]+)\s*(?P<U>[kKMG])i?B<\\/p>' OFFLINE_PATTERN = r'<div class=\\"f_left file_w\\"|<\\/p>\\t\\t\\t\\t\\r\\n\\t\\t<p><\\/p>\\t\\t\\r\\n\\t\\t<p>0 KB<\\/p>' + FILE_NAME_REPLACEMENTS = [("(.*)", doubleDecode)] - DOWNLOAD_URL_PATTERN = r'action="(http://download.*?)[#"]' - VIP_URL_PATTERN = r'<form action="([^>]+)" method="get" name="frm_download">' + + LINK_PATTERN = r'action="(http://download.*?)[#"]' WAIT_PATTERN = ur'Lượt tải xuống kế tiếp là:\s*(.*?)\s*<' + def process(self, pyfile): self.html = self.load('http://www.fshare.vn/check_link.php', post={ "action": "check_link", @@ -79,7 +81,7 @@ class FshareVn(SimpleHoster): found = re.search(r'var count = (\d+)', self.html) self.setWait(int(found.group(1)) if found else 30) - found = re.search(self.DOWNLOAD_URL_PATTERN, self.html) + found = re.search(self.LINK_PATTERN, self.html) if not found: self.parseError('FREE DL URL') self.url = found.group(1) |