Re:Python – Writing large ZIP archives without memory inflation
by mkl on Saturday May 16, 2020 @08:27AM
(#23202847)
Can you post your bookmarklet? I tried making a similar thing (using TamperMonkey) and ran into browser security restrictions preventing downloading of the files.
[ Parent
| on HN ]
Re:Python – Writing large ZIP archives without memory inflation
by johndough on Sunday May 17, 2020 @01:30PM
(#23213540)
I tried TamperMonkey for a different project, but it kept deleting my scripts, so I haven't pursued it any further.
Bookmarklets are executed in the context of the currently opened website, so downloading images from the same origin is usually not a problem. What can be an issue are remote images. I tried setting `Access-Control-Allow-Origin: *`, but then other downloads would fail, so I left it as it was since it worked for the websites I was interested in.
Here is the code: https://github.com/983/FileDownloader