Last active
June 30, 2020 09:34
-
-
Save 3isenHeiM/088f225cb01ad8569f97adb71f33e22a to your computer and use it in GitHub Desktop.
This script will download *high resolution* pictures from a YachtWorld article
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Remove any old HTML file in the current folder | |
rm *.html | |
# Enter the yachtworld page : | |
read -p "Paste the YachtWorld page: " WEBPAGE | |
# Get the HTML code of the yachtworld page | |
wget -O yachtworld_page.html $WEBPAGE | |
# Extract the image links and wget them | |
cat yachtworld_page.html | grep 'https:\/\/images.yachtworld.*\.jpg?' -o | sort | uniq | sed 's/.$//' | wget -i- | |
rm yachtworld_page.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment