Skip to content

Commit 73bdf18

Browse files
committed
Remove download_warning_ from cookies
1 parent 321059c commit 73bdf18

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

gdown/download.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,12 @@ def download(
115115

116116
# Save cookies
117117
with open(cookies_file, "w") as f:
118-
json.dump(sess.cookies.items(), f, indent=2)
118+
cookies = [
119+
(k, v)
120+
for k, v in sess.cookies.items()
121+
if not k.startswith("download_warning_")
122+
]
123+
json.dump(cookies, f, indent=2)
119124

120125
if "Content-Disposition" in res.headers:
121126
# This is the file

0 commit comments

Comments
 (0)