From c9b42f02f83a95d7741eee96247466d3b610b159 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 23 Oct 2015 13:29:12 +0200 Subject: self.html -> self.data --- module/plugins/hoster/XHamsterCom.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'module/plugins/hoster/XHamsterCom.py') diff --git a/module/plugins/hoster/XHamsterCom.py b/module/plugins/hoster/XHamsterCom.py index e13a209d1..0e78f01cd 100644 --- a/module/plugins/hoster/XHamsterCom.py +++ b/module/plugins/hoster/XHamsterCom.py @@ -45,18 +45,18 @@ class XHamsterCom(Hoster): def download_html(self): url = self.pyfile.url - self.html = self.load(url) + self.data = self.load(url) def get_file_url(self): """ Returns the absolute downloadable filepath """ - if not self.html: + if not self.data: self.download_html() flashvar_pattern = re.compile('flashvars = ({.*?});', re.S) - json_flashvar = flashvar_pattern.search(self.html) + json_flashvar = flashvar_pattern.search(self.data) if not json_flashvar: self.error(_("flashvar not found")) @@ -77,7 +77,7 @@ class XHamsterCom(Hoster): self.error(_("url_mode not found")) if self.desired_fmt == ".mp4": - file_url = re.search(r"(.*?) - xHamster\.com' - name = re.search(pattern, self.html) + name = re.search(pattern, self.data) if name is None: pattern = r'

(.*)

' - name = re.search(pattern, self.html) + name = re.search(pattern, self.data) if name is None: pattern = r'http://[www.]+xhamster\.com/movies/.*/(.*?)\.html?' name = re.match(file_name_pattern, self.pyfile.url) if name is None: pattern = r'' - name = re.search(pattern, self.html) + name = re.search(pattern, self.data) if name is None: return "Unknown" @@ -125,9 +125,9 @@ class XHamsterCom(Hoster): """ Returns True or False """ - if not self.html: + if not self.data: self.download_html() - if re.search(r"(.*Video not found.*)", self.html): + if re.search(r"(.*Video not found.*)", self.data): return False else: return True -- cgit v1.2.3