Skip to content

Instantly share code, notes, and snippets.

@edubey
Created November 18, 2018 09:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save edubey/d767bbbdb2c16c42c558800c3e9c2d7b to your computer and use it in GitHub Desktop.
Save edubey/d767bbbdb2c16c42c558800c3e9c2d7b to your computer and use it in GitHub Desktop.
Scrap Multiple Story from a Publisher Page
var i = 0,
maxCount = 5;
var storyInterval = setInterval(() => {
document.querySelectorAll(".js-trackedPost>a")[i].click()
setTimeout(() => {
console.log("Title : ", document.getElementsByClassName("graf--title")[i].innerText);
p = document.getElementsByClassName("ui-xs-clamp2")[0]
console.log("Profile Description : ", p ? p.innerText : "");
history.back()
}, 2000);
i++;
if (i == maxCount) clearInterval(storyInterval);
}, 8000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment