Originally Posted by
imanaknut
405 meg of pictures, yikes!
Yup. Lots of stuff there. It was quite a job to make scripts to extract the image links from the web page and also the playmate names, then when I downloaded all the images they had weird names like "6qZpC2x.jpg", so I needed another script to find each "strange" name and rename it to the playmate's name.jpg.
Here's what one of the scripts looks like (obviously not ALL of it since it's so long):
Code:
wget "http://i.imgur.com/6qZpC2x.jpg"
wget "http://i.imgur.com/PBTBFRN.jpg"
wget "http://i.imgur.com/wuyKN4o.jpg"
wget "http://i.imgur.com/JBxmp0N.jpg"
wget "http://i.imgur.com/AYn8YdU.jpg"
wget "http://i.imgur.com/RB0NVp0.jpg"
wget "http://i.imgur.com/oGUQ6Ci.jpg"
wget "http://i.imgur.com/xxkvwUH.jpg"
wget "http://i.imgur.com/lALQqdh.jpg"
wget "http://i.imgur.com/vCfJX7D.jpg"
wget "http://i.imgur.com/BN2HlrR.jpg"
wget "http://i.imgur.com/qeTDkZf.jpg"
wget "http://i.imgur.com/zFJqCtY.jpg"
Even with the computer doing it all, it took several minutes to go through all of the names and fix them.
Code:
mv "6qZpC2x.jpg" "Miss_December_1953_Marilyn_Monroe.jpg"
mv "PBTBFRN.jpg" "Miss_January_1954_Margie_Harrison.jpg"
mv "wuyKN4o.jpg" "Miss_February_1954_Margaret_Scott.jpg"
mv "JBxmp0N.jpg" "Miss_March_1954_Dolores_Del_Monte.jpg"
mv "AYn8YdU.jpg" "Miss_April_1954_Marilyn_Waltz.jpg"
mv "RB0NVp0.jpg" "Miss_May_1954_Joanne_Arnold.jpg"
mv "oGUQ6Ci.jpg" "Miss_June_1954_Margie_Harrison.jpg"
mv "xxkvwUH.jpg" "Miss_July_1954_Neva_Gilbert.jpg"
mv "lALQqdh.jpg" "Miss_August_1954_Arline_Hunter.jpg"
mv "vCfJX7D.jpg" "Miss_September_1954_Jackie_Rainbow.jpg"
mv "BN2HlrR.jpg" "Miss_October_1954_Madeline_Castle.jpg"
mv "qeTDkZf.jpg" "Miss_November_1954_Diane_Hunter.jpg"
mv "zFJqCtY.jpg" "Miss_December_1954_Terry_Ryan.jpg"
And all that data was extracted from the web content:
Code:
<div id="6qZpC2x" class="post-image-container post-image-container--spacer">
<h2 class="post-image-title font-opensans-semibold">Miss December 1953, Marilyn Monroe
</h2>
<div class="post-image">
<a href="//i.imgur.com/6qZpC2x.jpg" class="zoom">
<img src="//i.imgur.com/6qZpC2x.jpg" alt="" />
</a>
</div>
</div>
<div id="PBTBFRN" class="post-image-container post-image-container--spacer">
<h2 class="post-image-title font-opensans-semibold">Miss January 1954, Margie Harrison
</h2>
<div class="post-image">
<a href="//i.imgur.com/PBTBFRN.jpg" class="zoom">
<img src="//i.imgur.com/PBTBFRN.jpg" alt="" />
</a>
</div>
</div>
I had to find every occurance of class="post-image-container post-image-container--spacer" then grab the NEXT line for the playmate name, then replace any spaces in the name with "_" (underscore).
And of course the actual image name was found by taking the DIV element ID, then using it to construct the full name: http:/i.imgur.com/ plus 6qZpC2x plus .jpg
The whole job took about 1.5 hours.....
Bookmarks