#!/usr/bin/env python # -*- coding: utf-8 -*- import re from time import time from module.plugins.Hoster import Hoster class HotfileCom(Hoster): __name__ = "HotfileCom" __type__ = "hoster" __pattern__ = r"http://hotfile.com/dl/" __version__ = "0.2" __description__ = """Hotfile.com Download Hoster""" __author_name__ = ("sitacuisses","spoob","mkaay") __author_mail__ = ("sitacuisses@yhoo.de","spoob@pyload.org","mkaay@mkaay.de") def setup(self): self.html = [None, None] self.wantReconnect = False self.multiDL = False self.htmlwithlink = None self.url = None # if self.config['premium']: # self.multiDL = True # self.req.canContinue = True def process(self, pyfile): self.pyfile = pyfile self.prepare() self.download( self.get_file_url() ) def prepare(self): pyfile = self.pyfile self.wantReconnect = False self.download_html() if not self.file_exists(): self.offline() pyfile.name = self.get_file_name() # if self.config['premium']: # pyfile.status.url = self.get_file_url() # return True self.setWait( self.get_wait_time() ) self.wait() return True def download_html(self): # if self.config['premium']: # self.req.add_auth(self.config['username'], self.config['password']) self.html[0] = self.load(self.parent.url, get={"lang":"en"}, cookies=True) def get_file_url(self): # if self.config['premium']: # file_url_pattern = r'