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(); |
I made some updates to this:
https://gist.github.com/bryant988/9510cff838d86dcefa3b9ea3835b8552
Note, it works specifically for houses that are for sale since it renders different.
if someone figures out how to find it on wayback id love to know!
i played around for a while and doesn’t look like what you’re looking for
is indexed?
good luck!
…On Sat, Mar 14, 2020 at 8:30 PM Bryant Gallardo ***@***.***> wrote:
***@***.**** commented on this gist.
------------------------------
I made some updates to this:
https://gist.github.com/bryant988/9510cff838d86dcefa3b9ea3835b8552
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://gist.github.com/a844c589f3fab497ff930c116aa267e7#gistcomment-3212884>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AK63OUVLBF6BBJ7Q2OZOUMLRHRDVFANCNFSM4IU7PAJA>
.
Had to adjust the script, but this worked for me:
/**
* 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();
function download(url, filename) {
fetch(url)
.then(response => response.blob())
.then(blob => {
const link = document.createElement("a");
link.href = URL.createObjectURL(blob);
link.download = filename;
link.click();
})
.catch(console.error);
}
var img = $('ul.media-stream li img').map(function(){return $(this).attr("src");});
img.map(function(idx){ download(img[idx], idx+".jpg"); console.log(idx); });
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://www.zillow.com/homedetails/32901-Vine-St-Temecula-CA-92592/63320444_zpid/?