#!/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.1" __description__ = """Hotfile.com Download Hoster""" __author_name__ = ("sitacuisses","spoob","mkaay") __author_mail__ = ("sitacuisses@yhoo.de","spoob@pyload.org","mkaay@mkaay.de") def __init__(self, parent): Hoster.__init__(self, parent) self.parent = parent self.html = [None, None] self.want_reconnect = False self.multi_dl = False self.htmlwithlink = None self.url = None self.read_config() if self.config['premium']: self.multi_dl = True self.req.canContinue = True else: self.multi_dl = False def prepare(self, thread): pyfile = self.parent self.want_reconnect = False self.download_html() pyfile.status.exists = self.file_exists() if not pyfile.status.exists: return False pyfile.status.filename = self.get_file_name() if self.config['premium']: pyfile.status.url = self.get_file_url() return True self.get_wait_time() pyfile.status.waituntil = self.time_plus_wait pyfile.status.want_reconnect = self.want_reconnect thread.wait(self.parent) pyfile.status.url = self.get_file_url() return True def download_html(self): if self.config['premium']: self.req.add_auth(self.config['username'], self.config['password']) self.url = self.parent.url self.html[0] = self.load(self.url, get={"lang":"en"}, cookies=True) def get_file_url(self): if self.config['premium']: file_url_pattern = r'