WebHarvy Zillow Scraping Codes
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
| 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(); | |
| // Feb 28, 2023: | |
| // THE FOLLOWING CODE IS NO LONGER REQUIRED. RUN ONLY THE ABOVE CODE | |
| //--------------------------------------------------- | |
| // 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