Files
xamxam/front-backend/data/cover/curl.sh
2026-01-26 15:45:03 +01:00

17 lines
407 B
Bash

#!/bin/bash
# Download the index page and convert local links to global links
url="https://www.memo-dg.fr/"
curl $url > index.html
# Extract the image URLs from the downloaded HTML file
cat index.html | grep img | grep -Po 'src="\K.*?(?=")' | sed 's/\?.*//' > links.txt
# Download all the images using curl
while read -r file; do
curl -s -O $file
done < links.txt
# Clean up
rm index.html links.txt