This project automates downloading images and videos from a website by extracting their URLs via your browser's Network tab and saving them with a simple Node.js script.
- Node.js (v14 or newer)
- npm (bundled with Node.js)
- Web browser (e.g., Chrome, Firefox)
-
Clone or create your project folder
mkdir image-downloader cd image-downloader -
Add the downloader script
Save the provided
download.jsinto this folder (ensure it sits alongsidelinks.txt). -
Install Axios
npm init -y npm install axios
-
Capture image URLs
-
Open your browser and navigate to the page containing the images.
-
Open Developer Tools:
- Windows/Linux:
F12orCtrl+Shift+I - Mac:
Cmd+Option+I
- Windows/Linux:
-
Select the Network tab.
-
Reload the page to start capturing requests.
-
(Optional) Filter requests by typing
webpto show only.webpimages. -
For each image request:
- Right-click the request → Copy → Copy link address (or similar)
- Paste the URL on its own line into
links.txt
-
Save the
links.txtfile in your project folder.
-
-
Download the images
node download-all.js
-
Check your images
- All downloaded files will be in the
images/directory.
- All downloaded files will be in the
- If the first URL appears truncated or incorrect, remove any hidden BOM or extra whitespace at the top of
links.txt. - Ensure every line in
links.txtis a complete URL starting withhttps://. - Verify the
images/folder exists; the script will create it if missing.
With these steps, you can quickly grab and download all images from any page using a single command.