summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/PornhostCom.py
diff options
context:
space:
mode:
authorGravatar Jeix <devnull@localhost> 2010-08-01 14:11:19 +0200
committerGravatar Jeix <devnull@localhost> 2010-08-01 14:11:19 +0200
commitf94a0a5d7b74ca430a81084d843f0c096c2b4551 (patch)
tree17479ca12d17620c8fd5969a1dcd4e5c1387b516 /module/plugins/hoster/PornhostCom.py
parentsome fixes (diff)
downloadpyload-f94a0a5d7b74ca430a81084d843f0c096c2b4551.tar.xz
plugin updates to new interface
Diffstat (limited to 'module/plugins/hoster/PornhostCom.py')
-rw-r--r--module/plugins/hoster/PornhostCom.py19
1 files changed, 12 insertions, 7 deletions
diff --git a/module/plugins/hoster/PornhostCom.py b/module/plugins/hoster/PornhostCom.py
index db256c2ec..5dd681b5b 100644
--- a/module/plugins/hoster/PornhostCom.py
+++ b/module/plugins/hoster/PornhostCom.py
@@ -8,19 +8,24 @@ class PornhostCom(Hoster):
__name__ = "PornhostCom"
__type__ = "hoster"
__pattern__ = r'http://[\w\.]*?pornhost\.com/([0-9]+/[0-9]+\.html|[0-9]+)'
- __version__ = "0.1"
+ __version__ = "0.2"
__description__ = """Pornhost.com Download Hoster"""
__author_name__ = ("jeix")
__author_mail__ = ("jeix@hasnomail.de")
- def __init__(self, parent):
- Hoster.__init__(self, parent)
- self.parent = parent
- self.html = None
+ def process(self, pyfile):
+ self.download_html()
+ if not self.file_exists():
+ offline()
+
+ pyfile.name = self.get_file_name()
+ self.download(self.get_file_url())
+
+ ### old interface
def download_html(self):
- url = self.parent.url
- self.html = self.req.load(url)
+ url = self.pyfile.url
+ self.html = self.load(url)
def get_file_url(self):
""" returns the absolute downloadable filepath