Last active
January 8, 2024 07:30
-
-
Save tchen/a844c589f3fab497ff930c116aa267e7 to your computer and use it in GitHub Desktop.
Extract Images From Zillow Home Views
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
/** | |
* Note: First, browser through all the images for the home. Then paste the following snippet into the console. | |
* Images will be saved to the download directory. | |
*/ | |
var jq = document.createElement('script'); | |
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"; | |
document.getElementsByTagName('head')[0].appendChild(jq); | |
// ... give time for script to load, then type. | |
$ = jQuery.noConflict(); | |
var img = $('ul.photos li img').map(function(){return $(this).attr("src");}); | |
img.map(function(idx){ $("body").append($("<a class='xyzxyz' href='"+img[idx]+"' download='"+img[idx].split('/')[4]+"' />")); console.log(idx); }); | |
$('.xyzxyz').map(function(){ $(this)[0].click(); }); | |
$('.xyzxyz').remove(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Had to adjust the script, but this worked for me: