#!/usr/bin/env python # -*- coding: utf-8 -*- import re from module.plugins.Hoster import Hoster from time import time class FreakshareNet(Hoster): __name__ = "FreakshareNet" __type__ = "hoster" __pattern__ = r"http://(?:www\.)?freakshare\.net/files/\S*?/" __version__ = "0.3" __description__ = """Freakshare.com Download Hoster""" __author_name__ = ("sitacuisses","spoob","mkaay") __author_mail__ = ("sitacuisses@yahoo.de","spoob@pyload.org","mkaay@mkaay.de") def setup(self): self.html = None self.wantReconnect = False self.multiDL = False self.req_opts = [] def process(self, pyfile): self.pyfile = pyfile self.prepare() self.get_file_url() self.download(self.pyfile.url, post=self.req_opts) def prepare(self): pyfile = self.pyfile self.wantReconnect = False self.download_html() if not self.file_exists(): self.offline() self.setWait( self.get_waiting_time() ) pyfile.name = self.get_file_name() self.wait() return True def download_html(self): url = self.pyfile.url self.html = self.load(url, cookies=True) def get_file_url(self): """ returns the absolute downloadable filepath """ if self.html is None: self.download_html() if not self.wantReconnect: self.req_opts = self.get_download_options() # get the Post options for the Request #file_url = self.pyfile.url #return file_url else: self.offline() def get_file_name(self): if self.html is None: self.download_html() if not self.wantReconnect: file_name = re.search(r"