Created
April 24, 2014 05:57
-
-
Save curreta/11243075 to your computer and use it in GitHub Desktop.
Bikes Direct Downloader
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 | |
##download to disk | |
##wget -r -l 1 http://www.bikesdirect.com/products/road_bikes.htm | |
echo "<html><body>" | |
for sz in $(seq 49 64); | |
do | |
echo "<a href="size/${sz}/avail.txt">Size $sz:</a><br/>" | |
mkdir -p size/$sz; | |
echo "Size $sz:" > size/$sz/avail.txt; | |
for bike in `grep -ir "value=\"${sz}cm" products/* | grep -v SOLDOUT | cut -f 1 -d ':' | uniq` | |
do | |
echo "http://www.bikesdirect.com/"$bike >> size/$sz/avail.txt; | |
done | |
done | |
echo "</body></html>" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment