Closed chickenstealers closed 3 years ago
the location of the URL generator is moved to new location i think, but from the looks of it still the same algo.
Update extract function:
def extract(url, server, id):
regex = (
r'document.getElementById\(\'dlbutton\'\).href = "/d/[a-zA-Z\d]{8}/" \+ \((\d+) % (\d+) \+ (\d+) % (\d+)\) \+ "\/(.+)";'
)
for _ in range(3):
r = s.get(url)
if r.status_code != 500:
break
time.sleep(1)
r.raise_for_status()
meta = re.search(regex, r.text)
if not meta:
raise Exception('Failed to get file URL. File down or pattern changed.')
num_1 = int(meta.group(1))
num_2 = int(meta.group(2))
num_3 = int(meta.group(3))
num_4 = int(meta.group(4))
final_num = num_1 % num_2 + num_3 % num_4
enc_fname = meta.group(5)
file_url = "https://www{}.zippyshare.com/d/{}/{}/{}".format(server,id,final_num,enc_fname)
fname = unquote(enc_fname)
return file_url, fname
Update extract function:
def extract(url, server, id): regex = ( r'document.getElementById\(\'dlbutton\'\).href = "/d/[a-zA-Z\d]{8}/" \+ \((\d+) % (\d+) \+ (\d+) % (\d+)\) \+ "\/(.+)";' ) for _ in range(3): r = s.get(url) if r.status_code != 500: break time.sleep(1) r.raise_for_status() meta = re.search(regex, r.text) if not meta: raise Exception('Failed to get file URL. File down or pattern changed.') num_1 = int(meta.group(1)) num_2 = int(meta.group(2)) num_3 = int(meta.group(3)) num_4 = int(meta.group(4)) final_num = num_1 % num_2 + num_3 % num_4 enc_fname = meta.group(5) file_url = "https://www{}.zippyshare.com/d/{}/{}/{}".format(server,id,final_num,enc_fname) fname = unquote(enc_fname) return file_url, fname
Thanks working great
They went back to their previous pattern. Pushed to script.
Can't download Zippyshare Change their pattern again