Last active
August 29, 2015 14:17
-
-
Save EricTendian/738e438d26246f82c6ce to your computer and use it in GitHub Desktop.
Use this little jQuery script to help create a CSV from a Facebook chat. You'll need to copy the ul element with id webMessengerRecentMessages and everything inside it to a new HTML file, and then include jQuery. From there you can open up devtools, paste in this script, and get an output. Then copy that output into a new textfile, save it, chan…
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
$("li.webMessengerMessageGroup > div.clearfix > div.clearfix._42ef").each(function () { | |
var line = '"'+Math.round($(this).find("div.rfloat._ohf abbr").attr("data-utime"))+'","general","'+$(this).find("div:nth-child(2) > strong > a").text()+'",'; | |
$(this).find("div:nth-child(2) > div > div._53 > div").each(function () { | |
var text = $(this).find("div._38.direction_ltr > span > p").text().replace("\n","\\n"); | |
if (text.length) console.log(line + '"'+text+ "\"\n"); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment