Created
May 14, 2022 07:21
-
-
Save sysnucleus/d823908efea55e7c65e6a73939116c74 to your computer and use it in GitHub Desktop.
WebHarvy codes for Instagram Image Scraping
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
// RegEx for image selection | |
src[^\=]*="([^\s"]*) | |
// JavaScript code for pagination | |
els = document.getElementsByTagName('svg'); | |
for (var i = els.length - 1; i >= 0; i--) { | |
attr = els[i].getAttribute('aria-label'); | |
if(attr && attr === "Next") { | |
els[i].parentElement.click(); | |
break; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment