diff options
Diffstat (limited to 'module/plugins/hoster/YoupornCom.py')
-rw-r--r-- | module/plugins/hoster/YoupornCom.py | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/module/plugins/hoster/YoupornCom.py b/module/plugins/hoster/YoupornCom.py index fb9ef5a02..b90da4f83 100644 --- a/module/plugins/hoster/YoupornCom.py +++ b/module/plugins/hoster/YoupornCom.py @@ -8,29 +8,25 @@ class YoupornCom(Hoster): __name__ = "YoupornCom" __type__ = "hoster" __pattern__ = r"http://(www\.)?youporn\.com/watch/.+" - __version__ = "0.1" + __version__ = "0.2" __description__ = """Youporn.com Video Download Hoster""" __author_name__ = ("willnix") __author_mail__ = ("willnix@pyload.org") - def __init__(self, parent): - Hoster.__init__(self, parent) - self.parent = parent + def setup(self): self.html = None - self.html_old = None #time() where loaded the HTML - self.time_plus_wait = None #time() + wait in seconds - - def set_parent_status(self): - """ sets all available Statusinfos about a File in self.parent.status - """ - if self.html is None: - self.download_html() - self.parent.status.filename = self.get_file_name() - self.parent.status.url = self.get_file_url() - self.parent.status.wait = self.wait_until() + + 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.parent.url + url = self.pyfile.url self.html = self.load(url, post={"user_choice":"Enter"}, cookies=False) def get_file_url(self): @@ -39,7 +35,7 @@ class YoupornCom(Hoster): if self.html is None: self.download_html() - file_url = re.search(r'(http://download.youporn.com/download/\d*/.*\?download=1&ll=1&t=dd)">', self.html).group(1) + file_url = re.search(r'(http://download.youporn.com/download/\d*/(?:flv/)?.*\?save=1)">', self.html).group(1) return file_url def get_file_name(self): |