I’m trying to download files from the Network tab, I get a link like this “blob:https://aaaaaaaaaaa.org/c8788081-fc3c-4779-b576-0a184c698c35″, but when I try to download, I get “Not allowed to load local resource: blob:<URL>”. What am I doing wrong?
I added the launch key to chrome browser (–disable-web-security –allow-file-access-from-files –allow-file-access), didn’t help.
async function sleep(millis) {
return new Promise(resolve => setTimeout(resolve, millis));
}
(async () => {
var nodes = UI.panels.network.networkLogView.dataGrid.rootNode().flatNodes,
arrUrls = [];
nodes.forEach(function() {
var req = arguments[0].request();
if (req !== undefined) {
const substring = "blob:https";
if (req.url().includes(substring)) {
arrUrls.push(req.url());
}
}
});
i = 0;
for (const sUrl of arrUrls) {
await sleep(1000);
i++;
var link = document.createElement('a');
link.href = sUrl;
link.download = i + '_download.jpg';
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
delete link;
}
})();