diff options
author | Stefano <l.stickell@yahoo.it> | 2013-07-22 20:50:34 +0200 |
---|---|---|
committer | Stefano <l.stickell@yahoo.it> | 2013-07-22 20:50:34 +0200 |
commit | 2edeee0532ec6d6b4b26fd045a5971f67ca455da (patch) | |
tree | 8d656afc9c18f7dba7c05d6635f898fdf58d66d6 /module/plugins/hoster/YoupornCom.py | |
parent | Fixed PEP 8 violations in Crypters (diff) | |
download | pyload-2edeee0532ec6d6b4b26fd045a5971f67ca455da.tar.xz |
Fixed PEP 8 violations in Hosters
Diffstat (limited to 'module/plugins/hoster/YoupornCom.py')
-rw-r--r-- | module/plugins/hoster/YoupornCom.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/module/plugins/hoster/YoupornCom.py b/module/plugins/hoster/YoupornCom.py index b17a4ef80..d029db7ba 100644 --- a/module/plugins/hoster/YoupornCom.py +++ b/module/plugins/hoster/YoupornCom.py @@ -4,6 +4,7 @@ import re from module.plugins.Hoster import Hoster + class YoupornCom(Hoster): __name__ = "YoupornCom" __type__ = "hoster" @@ -15,19 +16,19 @@ class YoupornCom(Hoster): def setup(self): self.html = None - + def process(self, pyfile): self.pyfile = pyfile - + if not self.file_exists(): self.offline() - + self.pyfile.name = self.get_file_name() self.download(self.get_file_url()) def download_html(self): url = self.pyfile.url - self.html = self.load(url, post={"user_choice":"Enter"}, cookies=False) + self.html = self.load(url, post={"user_choice": "Enter"}, cookies=False) def get_file_url(self): """ returns the absolute downloadable filepath @@ -43,7 +44,7 @@ class YoupornCom(Hoster): self.download_html() file_name_pattern = r"<title>(.*) - Free Porn Videos - YouPorn</title>" - return re.search(file_name_pattern, self.html).group(1).replace("&", "&").replace("/","") + '.flv' + return re.search(file_name_pattern, self.html).group(1).replace("&", "&").replace("/", "") + '.flv' def file_exists(self): """ returns True or False |