diff options
author | mkaay <mkaay@mkaay.de> | 2009-12-27 00:20:21 +0100 |
---|---|---|
committer | mkaay <mkaay@mkaay.de> | 2009-12-27 00:20:21 +0100 |
commit | 8e87787753b2e049917a5491727d285b1c5a7095 (patch) | |
tree | 9b23fb14b0f1270edc4582758bcf3a39cfd97b67 /module/plugins/XupIn.py | |
parent | closes #42 (diff) | |
download | pyload-8e87787753b2e049917a5491727d285b1c5a7095.tar.xz |
closes #13
Diffstat (limited to 'module/plugins/XupIn.py')
-rw-r--r-- | module/plugins/XupIn.py | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/module/plugins/XupIn.py b/module/plugins/XupIn.py deleted file mode 100644 index d044f2389..000000000 --- a/module/plugins/XupIn.py +++ /dev/null @@ -1,69 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -import re -from module.Plugin import Plugin - -class XupIn(Plugin): - - def __init__(self, parent): - Plugin.__init__(self, parent) - props = {} - props['name'] = "XupIn" - props['type'] = "hoster" - props['pattern'] = r"http://(?:www.)?xup.in/" - props['version'] = "0.1" - props['description'] = """Xup.in Download Plugin""" - props['author_name'] = ("spoob") - props['author_mail'] = ("spoob@pyload.org") - self.props = props - self.parent = parent - self.html = None - self.html_old = None #time() where loaded the HTML - self.time_plus_wait = None #time() + wait in seconds - self.posts = {} - self.want_reconnect = None - self.multi_dl = False - - def download_html(self): - url = self.parent.url - self.html = self.req.load(url) - self.posts["vid"] = re.search('"hidden" value="(.*)" name="vid"', self.html).group(1) - self.posts["vtime"] = re.search('"hidden" value="(.*)" name="vtime"', self.html).group(1) - - def get_file_url(self): - """ returns the absolute downloadable filepath - """ - if self.html == None: - self.download_html() - if not self.want_reconnect: - file_url_pattern = r".*<form action=\"(.*)\" method=\"post\">" - return re.search(file_url_pattern, self.html).group(1) - else: - return False - - def get_file_name(self): - if self.html == None: - self.download_html() - if not self.want_reconnect: - return self.parent.url.split('/')[-2] - else: - return self.parent.url - - def file_exists(self): - """ returns True or False - """ - if self.html == None: - self.download_html() - if re.search(r"(.*<font color=\"#ff0000\">File does not exist</font>.*)", self.html, re.I) != None: - return False - else: - return True - - def proceed(self, url, location): - self.req.download(url, location, self.posts) - - def wait_until(self): - if self.html == None: - self.download_html() - return self.time_plus_wait |