diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-08-17 15:34:08 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-08-17 15:34:08 +0200 |
commit | e921a8a45fa785db160d2b1e518e871028454d2f (patch) | |
tree | 018a10e5d742bbfdfa08f206efc892ccbf450685 /module/plugins/hoster/FilefactoryCom.py | |
parent | account update (diff) | |
download | pyload-e921a8a45fa785db160d2b1e518e871028454d2f.tar.xz |
cleaned pluginsv0.4
Diffstat (limited to 'module/plugins/hoster/FilefactoryCom.py')
-rw-r--r-- | module/plugins/hoster/FilefactoryCom.py | 99 |
1 files changed, 0 insertions, 99 deletions
diff --git a/module/plugins/hoster/FilefactoryCom.py b/module/plugins/hoster/FilefactoryCom.py deleted file mode 100644 index fe68c914f..000000000 --- a/module/plugins/hoster/FilefactoryCom.py +++ /dev/null @@ -1,99 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -import re -from module.plugins.Hoster import Hoster -from time import time - -class FilefactoryCom(Hoster): - __name__ = "FilefactoryCom" - __type__ = "hoster" - __pattern__ = r"http://(?:www\.)?filefactory\.com/file/" - __version__ = "0.1" - __description__ = """Filefactory.com Download Hoster""" - __author_name__ = ("sitacuisses","spoob","mkaay") - __author_mail__ = ("sitacuisses@yahoo.de","spoob@pyload.org","mkaay@mkaay.de") - - def __init__(self, parent): - Hoster.__init__(self, parent) - self.parent = parent - self.html = None - self.want_reconnect = False - self.multi_dl = False - self.htmlwithlink = None - - 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 - - self.get_waiting_time() - - pyfile.status.filename = self.get_file_name() - - pyfile.status.waituntil = self.time_plus_wait - pyfile.status.url = self.get_file_url() - pyfile.status.want_reconnect = self.want_reconnect - - thread.wait(self.parent) - - return True - - def download_html(self): - url = self.parent.url - self.html = self.load(url, cookies=True) - tempurl = re.search('a href=\"(.*?)\".*?button\.basic\.jpg', self.html).group(1) - self.htmlwithlink = self.load("http://www.filefactory.com"+tempurl, cookies=True) - - def get_file_url(self): - """ returns the absolute downloadable filepath - """ - if self.html == None: - self.download_html() - if not self.want_reconnect: - file_url = re.search('a href=\"(.*?)\" id=\"downloadLinkTarget\"', self.htmlwithlink).group(1) - #print file_url - return file_url - else: - return False - - def get_file_name(self): - if self.html == None: - self.download_html() - if not self.want_reconnect: - file_name = re.search('content=\"Download\ (\S*?)\ for\ free\.', self.html).group(1) - return file_name - else: - return self.parent.url - - def get_waiting_time(self): - if self.html == None: - self.download_html() - countdown_re = re.compile("countdown.*?>(\d+)") - m = countdown_re.search(self.htmlwithlink) - if m: - sec = int(m.group(1)) - else: - sec = 0 - self.time_plus_wait = time() + sec - - def file_exists(self): - """ returns True or False - """ - if self.html == None: - self.download_html() - if re.search(r"Such file does not exist or it has been removed for infringement of copyrights.", self.html) != None: - return False - else: - return True - - def proceed(self, url, location): - self.download(url, location, cookies=True) - |