[^/]+).*"
__version__ = "0.14"
__description__ = """stahnu.to"""
__author_name__ = ("zoidberg")
FILE_NAME_PATTERN = r"Název souboru (?P[^<]+)"
FILE_SIZE_PATTERN = r' | Velikost souboru (?P[^<]+)\s*(?P[kKMG])i?[Bb] | '
FILE_OFFLINE_PATTERN = r'\s*'
def setup(self):
self.multiDL = True
def process(self, pyfile):
if not self.account:
self.fail("Please enter your stahnu.to account")
found = re.search(self.__pattern__, pyfile.url)
file_id = found.group(1)
self.html = self.load("http://www.stahnu.to/getfile.php?file=%s" % file_id, decode=True)
self.getFileInfo()
if "K stažení souboru se musíte zdarma přihlásit!" in self.html:
self.account.relogin(self.user)
self.retry()
self.download("http://www.stahnu.to/files/gen/" + file_id, post={
"downloadbutton": u"STÁHNOUT"
})