Created
April 8, 2013 14:41
-
-
Save dcvezzani/5337292 to your computer and use it in GitHub Desktop.
Scrape thumbnails from shutterstock summary references.
This file contains 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
# download html summaries | |
# paste in html reference to stockphoto summary page | |
# use wget to download a static page | |
wget http://www.shutterstock.com/pic-12539920/stock-photo-pretty-young-woman-with-arms-raised-standing-on-beach.html?src=1pUEJjjRjtTVA1C8FaQDfw-2-41 | |
wget http://www.shutterstock.com/pic.mhtml?id=97713707 | |
wget http://www.shutterstock.com/pic.mhtml?id=123208630 | |
wget http://www.shutterstock.com/pic.mhtml?id=111719192 | |
wget http://www.shutterstock.com/pic.mhtml?id=59363377 | |
wget http://www.shutterstock.com/pic.mhtml?id=53308978 | |
wget http://www.shutterstock.com/pic.mhtml?id=132296033 | |
wget http://www.shutterstock.com/pic-102817613/stock-photo-young-beautiful-girl-in-the-field.html?src=1pUEJjjRjtTVA1C8FaQDfw-1-63 | |
wget http://www.shutterstock.com/pic-122958376/stock-photo-happy-young-man-jumping-on-meadow-against-clear-sky-background.html?src=1pUEJjjRjtTVA1C8FaQDfw-1-83 | |
wget http://www.shutterstock.com/pic-101278045/stock-photo-beautiful-girl-with-white-scarf-on-the-beach-travel-and-vacation.html?src=1pUEJjjRjtTVA1C8FaQDfw-1-78 | |
wget --output-document shutterstock.html http://www.shutterstock.com/pic-100173191/stock-photo-happy-man-with-hands-up-on-sunset-background.html?src=1pUEJjjRjtTVA1C8FaQDfw-1-97 | |
# isolate line from downloaded html summary | |
# copy and paste output line of matched hits | |
grep -r "<img class=\"thumb_image\" " . | |
./pic.mhtml?id=111719192: <img class="thumb_image" src="http://image.shutterstock.com/display_pic_with_logo/103308/111719192/stock-photo-happy-businessman-standing-on-field-before-the-sunset-111719192.jpg" alt="happy businessman standing on field before the sunset - stock photo" title="happy businessman standing on field before the sunset - stock photo" align="absmiddle" border="0"> | |
./pic.mhtml?id=123208630: <img class="thumb_image" src="http://image.shutterstock.com/display_pic_with_logo/101595/123208630/stock-photo-beautiful-young-woman-enjoy-the-breeze-outdoor-in-a-summer-day-123208630.jpg" alt="Beautiful young woman enjoy the breeze outdoor in a summer day - stock photo" title="Beautiful young woman enjoy the breeze outdoor in a summer day - stock photo" align="absmiddle" border="0"> | |
./pic.mhtml?id=132296033: <img class="thumb_image" src="http://image.shutterstock.com/display_pic_with_logo/167203/132296033/stock-photo-silhouette-image-of-man-raising-his-hands-with-ray-of-light-132296033.jpg" alt="Silhouette Image of Man Raising His Hands With Ray of Light - stock photo" title="Silhouette Image of Man Raising His Hands With Ray of Light - stock photoalign="absmiddle" border="0"> | |
./pic.mhtml?id=53308978: <img class="thumb_image" src="http://image.shutterstock.com/display_pic_with_logo/195826/195826,1274138402,2/stock-photo-beautiful-jumping-girl-53308978.jpg" alt="Beautiful Jumping Girl - stock photo" title="Beautiful Jumping Girl - stock photo" align="absmiddle" border="0"> | |
./pic.mhtml?id=59363377: <img class="thumb_image" src="http://image.shutterstock.com/display_pic_with_logo/419500/419500,1282234089,14/stock-photo-the-young-beautiful-woman-quickly-runs-on-a-glade-of-sunflower-smiles-hands-are-opened-59363377.jpg" alt="The young beautiful woman quickly runs on a glade of sunflower, smiles, hands are opened - stock photo" title="The young beautiful woman quickly runs on a glade of sunflower, smiles, hands are opened - stock photo" align="absmiddle" border="0"> | |
./pic.mhtml?id=97713707: <img class="thumb_image" src="http://image.shutterstock.com/display_pic_with_logo/862051/97713707/stock-photo-young-girl-spreading-hands-with-joy-and-inspiration-facing-the-sun-97713707.jpg" alt="Young girl spreading hands with joy and inspiration facing the sun - stock photo"title="Young girl spreading hands with joy and inspiration facing the sun - stock photo" align="absmiddle" border="0"> | |
./shutterstock.html: <img class="thumb_image" src="http://image.shutterstock.com/display_pic_with_logo/117238/100173191/stock-photo-happy-man-with-hands-up-on-sunset-background-100173191.jpg" alt="happy man with hands up on sunset background - stock photo" title="happy man with hands up on sunset background - stock photo" align="absmiddle" border="0"> | |
./stock-photo-beautiful-girl-with-white-scarf-on-the-beach-travel-and-vacation.html?src=1pUEJjjRjtTVA1C8FaQDfw-1-78: <img class="thumb_image" src="http://image.shutterstock.com/display_pic_with_logo/195826/101278045/stock-photo-beautiful-girl-with-white-scarf-on-the-beach-travel-and-vacation-101278045.jpg" alt="Beautiful Girl With White Scarf on The Beach. Travel and Vacation. - stock photo" title="Beautiful Girl With White Scarf on The Beach. Travel and Vacation. - stock photo" align="absmiddle" border="0"> | |
./stock-photo-happy-young-man-jumping-on-meadow-against-clear-sky-background.html?src=1pUEJjjRjtTVA1C8FaQDfw-1-83: <img class="thumb_image" src="http://image.shutterstock.com/display_pic_with_logo/442207/122958376/stock-photo-happy-young-man-jumping-on-meadow-against-clear-sky-background-122958376.jpg" alt="happy young man jumping on meadow against clear sky background - stock photo" title="happy young man jumping on meadow against clear sky background - stock photo" align="absmiddle" border="0"> | |
./stock-photo-pretty-young-woman-with-arms-raised-standing-on-beach.html?src=1pUEJjjRjtTVA1C8FaQDfw-2-41: <img class="thumb_image" src="http://image.shutterstock.com/display_pic_with_logo/2700/2700,1210665477,4/stock-photo-pretty-young-woman-with-arms-raised-standing-on-beach-12539920.jpg" alt="Pretty young woman with arms raised standing on beach - stock photo" title="Pretty young woman with arms raised standing on beach - stock photo" align="absmiddle" border="0"> | |
./stock-photo-young-beautiful-girl-in-the-field.html?src=1pUEJjjRjtTVA1C8FaQDfw-1-63: <img class="thumb_image" src="http://image.shutterstock.com/display_pic_with_logo/317854/102817613/stock-photo-young-beautiful-girl-in-the-field-102817613.jpg" alt="young beautiful girl in the field - stock photo" title="young beautiful girl in the field - stock photo" align="absmiddle" border="0"> | |
# scrape thumbnail references | |
# start each line with wget so that output may be run from terminal | |
# copy and paste into terminal | |
# may need to include a pause between each request as photos may be skipped or corrupted | |
:%s/[^:]\+:[^<]\+<img class=\"thumb_image\" src=\"\([^\"]\+\).\+/wget \1/g |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment