-
The script checks if the specified local folder for memes exists and creates one if not.
-
It fetches the HTML data of the website and parse the document.
-
The code then loops over the first 10 images, downloads and saves them to a local folder.
-
Each image is named 1-10.jpg with double digits (e.g., "01.jpg", "02.jpg").
-
Success messages are logged for each downloaded image, and a final success message is displayed upon completing the scraping process.
- Axios
pnpm add axios
- Cheerio
pnpm add cheerio
- fs