I'm using PhantomJS to pull out some data from the twitter page. Here is a sample content that I'm trying to scrap:
541 replies .This is my code for getting the reply count:
var replyCount = page.evaluate(function(){
return document.getElementsByClassName("ProfileTweet-action--reply");
});
for (var i = 0; i < replyCount.length; i++) {
var replyInt = replyCount[i].ierText;
console.log(replyInt);
}
Output is 541 replies
Is there a way to scrap the value just for data-tweet-stat-count so I can get "541"?
There are also other elements with the same name data-tweet-stat-count in that page. Can anyone lead me on this?
