diff --git a/handler.py b/handler.py index 59620f4..c13e21d 100755 --- a/handler.py +++ b/handler.py @@ -59,7 +59,7 @@ def pageHandler(driver): fid = a["href"].split("=")[1] if not glob.glob("files/sbd%s*" % fid): res = session.get("https://scriptzbase.org/%s" % a["href"]) - fname = re.findall("filename=(.+)", res.headers["content-disposition"])[0].strip('"') + fname = re.findall("filename=(.+)", res.headers["content-disposition"])[0].split(";")[0].strip('"') with open("files/sbd%s_%s" % (fid, fname), "wb") as out: out.write(res.content)