[^']+)';"
FILE_OFFLINE_PATTERN = r''
FILE_NAME_PATTERN = r'Název: | \s*(?P[^<]+) | '
FILE_SIZE_PATTERN = r'Velikost: | \s*(?P[0-9.]+) (?P[kKMG])i?B | '
def setup(self):
self.multiDL = False
def process(self, pyfile):
self.html = self.load(pyfile.url, decode=True)
self.getFileInfo()
# parse the name from the site and set attribute in pyfile
parsed_vars = re.search(self.VAR_PATTERN, self.html)
if parsed_vars is None: self.parseError("VARs")
pyfile.name = parsed_vars.group('ID3')
# download the file, destination is determined by pyLoad
download_url = parsed_vars.group('Server') + "/download.php"
self.log.debug("File:" + pyfile.name)
self.log.debug("URL:" + download_url)
self.download(download_url, post={
"ID1": parsed_vars.group('ID1'),
"ID2": parsed_vars.group('ID2'),
"ID3": parsed_vars.group('ID3'),
"ID4": parsed_vars.group('ID4')
})
# check download
check = self.checkDownload({
"no_slots": "obsazen na 100 %"
})
if check == "no_slots":
self.retry(5, 600, "No free slots")
create_getInfo(QuickshareCz)