Skip to content

Instantly share code, notes, and snippets.

@sysnucleus
Last active Aug 29, 2022
Embed
What would you like to do?
WebHarvy Zillow Scraping Codes
Apply Capture More Conent 4 times repeatedly for placeholder (till you get <li class=... in the Capture window), after clicking on PRICE
//---------------------------------------------------
// JS Code 1
//---------------------------------------------------
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
async function scrollList() {
list = document.getElementsByClassName('photo-cards')[0];
for (var i = 0; i < list.childElementCount; i++) {
list.children[i].scrollIntoView();
await sleep(100);
}
}
scrollList();
//---------------------------------------------------
// JS Code 2
//---------------------------------------------------
els = document.getElementsByTagName('article');
for (var i = els.length - 1; i >= 0; i--) {
if(els[i].parentElement.tagName !== 'LI') {
els[i].parentElement.parentElement.parentElement.appendChild(els[i]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment