diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-07-15 16:25:41 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-07-15 16:25:41 +0200 |
commit | 5060e4c6374a5116d0d8b02528f910f8c5f8bcf9 (patch) | |
tree | b3f80dbd9e759747f9c2acb60f614c5daa7af69e /module/plugins/hoster/PornhostCom.py | |
parent | Fix class definition (diff) | |
download | pyload-5060e4c6374a5116d0d8b02528f910f8c5f8bcf9.tar.xz |
Fix code indentation, some bad whitespaces and missing authors + use 'not' instead 'is None' + replace __pattern__'s r" with r' + other minor cosmetics
Diffstat (limited to 'module/plugins/hoster/PornhostCom.py')
-rw-r--r-- | module/plugins/hoster/PornhostCom.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/module/plugins/hoster/PornhostCom.py b/module/plugins/hoster/PornhostCom.py index 61b382c81..18032519c 100644 --- a/module/plugins/hoster/PornhostCom.py +++ b/module/plugins/hoster/PornhostCom.py @@ -21,7 +21,7 @@ class PornhostCom(Hoster): pyfile.name = self.get_file_name() self.download(self.get_file_url()) - ### old interface + # Old interface def download_html(self): url = self.pyfile.url self.html = self.load(url) @@ -29,7 +29,7 @@ class PornhostCom(Hoster): def get_file_url(self): """ returns the absolute downloadable filepath """ - if self.html is None: + if not self.html: self.download_html() file_url = re.search(r'download this file</label>.*?<a href="(.*?)"', self.html) @@ -46,7 +46,7 @@ class PornhostCom(Hoster): return file_url def get_file_name(self): - if self.html is None: + if not self.html: self.download_html() name = re.search(r'<title>pornhost\.com - free file hosting with a twist - gallery(.*?)</title>', self.html) @@ -64,7 +64,7 @@ class PornhostCom(Hoster): def file_exists(self): """ returns True or False """ - if self.html is None: + if not self.html: self.download_html() if (re.search(r'gallery not found', self.html) is not None or |