JSFiddle - React, Tailwind, and code Playground
JavaScript
var i,j,k;
var x = document.getElementsByTagName("article");
for (i = 0; i < x.length; i++)
{
var userName,profilePicUrl,postText,postTime = "";
if(x[i].classList.contains("_55wo") && x[i].firstChild.getElementsByClassName("_5msi").length > 0)
{
// GET USER NAME
userName = x[i].getElementsByClassName("profpic")[0].getAttribute("aria-label");
// END OF GET USER NAME
// GET POST TIME
postTime = x[i].getElementsByTagName("abbr")[0].innerText;
// END OF GET POST TIME
// GET PROFILE PIC
profilePicUrl = x[i].getElementsByClassName("profpic")[0].style.background;
var index = profilePicUrl.indexOf("(")+1;
profilePicUrl = profilePicUrl.substr(index, profilePicUrl.indexOf(")")-index);
// END OF GET PROFILE PIC
// GET STATUS
var tempText = x[i].firstChild.getElementsByClassName("_5msi");
for (j = 0; j < tempText.length; j++)
{
var allText = tempText[j].firstChild.getElementsByTagName("p");
var status = "";
for (k = 0; k < allText.length; k++)
status += allText[k].innerText + "\n";
postText = status.substr(0, status.length-1);
}
// END OF GET STATUS
console.log("# User name: ", userName);
console.log("# Status: ", postText);
console.log("# Profile pic: ", profilePicUrl);
console.log("# Posted: ", postTime);
}
}