Last active
November 21, 2024 08:28
-
-
Save mklooss/fcb8975b12eadc947bc0a823ec510804 to your computer and use it in GitHub Desktop.
Cachewarm with lynx and all links on page
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 | |
# get data with curl, lynx only support http/1.0 | |
curl -s --connect-timeout 10 --max-time 10 -o /tmp/shopdomain.tld.html https://www.shopdomain.tld/ | |
for i in $(lynx --listonly --nonumbers --display_charset=utf-8 --dump /tmp/shopdomain.tld.html | grep shopdomain.tld | sort | uniq | sort --random-sort | grep -v 'checkout\|wishlist\|contact\|customer\|account'); do | |
echo $i | |
curl -s --connect-timeout 10 --max-time 10 $i > /dev/null | |
date | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment