diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-07-20 03:25:14 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-07-20 03:25:14 +0200 |
commit | 05d258d98dd8c2faf0b769840fa1e3c4acccdce8 (patch) | |
tree | 20d379639d14a2b69deaa9e0376e33312b5bb994 /module/plugins/hoster/VeehdCom.py | |
parent | [ShareRapidCom] Fix https://github.com/pyload/pyload/issues/694 (diff) | |
download | pyload-05d258d98dd8c2faf0b769840fa1e3c4acccdce8.tar.xz |
Fix and improve 5060e4c6374a5116d0d8b02528f910f8c5f8bcf9
Diffstat (limited to 'module/plugins/hoster/VeehdCom.py')
-rw-r--r-- | module/plugins/hoster/VeehdCom.py | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/module/plugins/hoster/VeehdCom.py b/module/plugins/hoster/VeehdCom.py index fd804d3f9..33fa76d47 100644 --- a/module/plugins/hoster/VeehdCom.py +++ b/module/plugins/hoster/VeehdCom.py @@ -47,10 +47,11 @@ class VeehdCom(Hoster): if not self.html: self.download_html() - match = re.search(r'<title[^>]*>([^<]+) on Veehd</title>', self.html) - if not match: + found = re.search(r'<title[^>]*>([^<]+) on Veehd</title>', self.html) + if found is None: self.fail("video title not found") - name = match.group(1) + + name = found.group(1) # replace unwanted characters in filename if self.getConfig('filename_spaces'): @@ -58,9 +59,7 @@ class VeehdCom(Hoster): else: pattern = '[^0-9A-Za-z\.]+' - name = re.sub(pattern, self.getConfig('replacement_char'), - name) - return name + '.avi' + return re.sub(pattern, self.getConfig('replacement_char'), name) + '.avi' def get_file_url(self): """ returns the absolute downloadable filepath @@ -68,10 +67,9 @@ class VeehdCom(Hoster): if not self.html: self.download_html() - match = re.search(r'<embed type="video/divx" src="(http://([^/]*\.)?veehd\.com/dl/[^"]+)"', + found = re.search(r'<embed type="video/divx" src="(http://([^/]*\.)?veehd\.com/dl/[^"]+)"', self.html) - if not match: + if found is None: self.fail("embedded video url not found") - file_url = match.group(1) - return file_url + return found.group(1) |