How to download blob video source

I have a small plugin to download videos but the new update site use blob source so I can’t download it, any tips how I can do that with application.

I got error:

Security Error: Content at moz-extension://1d58e86b-338f-4fc2-b4ba-2085a4bd1f48/_generated_background_page.html may not load data from blob:https://www.newapp.com/9cbe20f8-7908-453f-8667-e0cb58d6ae54.

Can you provide more info?
The blob may exist only in the website, so if you send the link to your background script, you will loose the ability to download it (I think…).

You can try to use fetch to download it already in your content script (you have one, right?).

Thank you for suggestion:

I tried to add below code in content script “index.js” and get an error:

fetch(url).then(c=> c.blob()).then(c=>{
console.log©;
}).catch(e=> console.log(e));

TypeError: NetworkError when attempting to fetch resource.

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://graph.instagram.com/logging_client_events. (Reason: CORS request did not succeed). Status code: (null).

is there any permission to add?

Hello again,
Do you have host permissions for that domain? Or are you using only activeTab permission?
Could you paste here your manifest file content?

1 Like

Hello Here the full manifest
{
“manifest_version”: 2,
“name”: “Insta Download”,
“version”: “1.2”,
“description”: “Download From Insta”,
“icons”: {
“48”: “icons/download-48.png”
},
“web_accessible_resources”: [“icons/download-48.png”],
“permissions”: [“downloads”],
“background”: {
“scripts”: [
“js/download.js”
]
},
“content_scripts”: [
{
“matches”: ["://.instagram.com/*"],
“js”: [
“js/jquery.js”,
“index.js”
],
“css”: [
“css/index.css”
]
}
]
}

Hello again,
When pasting code here, place triple backticks (```) on the line above and below the code.

In any case, try to add this line to the list of your permissions:

"*://*.instagram.com/*"

See this page for more examples:

now i got this error Message :expressionless:

TypeError: NetworkError when attempting to fetch resource.
moz-extension://a1538d58-dbce-4441-868c-2508d6fc42ee/index.js:58
jQuery 8
moz-extension://a1538d58-dbce-4441-868c-2508d6fc42ee/index.js:14

@juraj.masiar thank you that works now after remove “blob:” from url

Thank you very much

it’s return html not a video as expected.
seems i can’t retrive the video from url like “blob:https://www.instagram.com/fb7e17f3-4b37-4285-9f01-2ff69f8f7887

Multimedia download and especially video can be crazy complicated to download.
That’s why some of the downloaders needs external app to further process the downloaded content (sometimes the video and audio is served separately or in chunks and you need to merge it together).

In any case, you are probably using wrong download URL.
If you can’t find the correct URL, you can try to listen to some of the webRequests and then find which one is multimedia:

But this is not gonna be a piece of cake…

1 Like