This Tampermonkey user script extracts, indexes, and automatically downloads blob:
URLs from media elements (e.g., audio, video, images) on a webpage. The script is particularly useful for sites that dynamically generate and use blob:
URLs, such as Natural Readers.
Each blob:
URL is captured and downloaded sequentially with a numbered filename, such as file_1.mp3
, file_2.mp3
, etc.
- Automatically detects
blob:
URLs created via JavaScript'sURL.createObjectURL
method. - Monitors dynamically added media elements (e.g.,
<audio>
,<video>
,<img>
,<iframe>
,<source>
) on the page and captures theirblob:
URLs. - Adds a "Download All Blob URLs" button to the webpage that, when clicked, downloads all captured URLs in sequence.
- File naming convention:
file_1.mp3
,file_2.mp3
, etc.
- The script hooks into
URL.createObjectURL
to capture any dynamically createdblob:
URLs. - It scans the webpage for media elements that use
blob:
URLs. - A button is added to the page to download all captured
blob:
URLs in sequential order.
You need to have Tampermonkey or a similar user script manager installed in your browser:
- Chrome: Tampermonkey Extension
- Firefox: Tampermonkey Extension
- Edge: Tampermonkey Extension
- Open Tampermonkey Dashboard in your browser.
- Create a new script.
- Paste the script from this repository into the editor.
- Save the script.
- Visit Natural Readers or any other site where you want to capture
blob:
URLs. - The script will automatically run and capture any
blob:
URLs from media elements on the page. - A button titled "Download All Blob URLs" will appear in the top-right corner of the page.
- Click the button to download all captured
blob:
URLs in sequential order. Each file will be downloaded with an index-based filename (e.g.,file_1.mp3
,file_2.mp3
, etc.).
// ==UserScript==
// @name Extract and Download Blob URLs with Index
// @namespace http://tampermonkey.net/
// @version 1.3
// @description Extract, index, and download blob URLs automatically in order.
// @author You
// @match https://www.naturalreaders.com/*
// @grant none
// ==/UserScript==
You can customize the file extension or modify the filename by editing this line in the script:
a.download = `file_${index}.mp3`;
You can change .mp3
to another extension (e.g., .png
, .wav
) depending on the type of media you're downloading.
Feel free to fork this repository and submit pull requests with improvements, bug fixes, or new features.
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any issues or have questions, please open an issue in this repository, and I will address it as soon as possible.