This is a fork of the Node.js Slack Channel Scraper which works with the latest Slack API. Added a few features such as support for quoted text. The following code pulls a full channel history from the Slack API, exports the message and user data to .json files, then parses an HTML mockup of the history in a similar style to Slack.
Node.js is required in order to run this scraper.
To use, set the token
variable to your xoxc
token of the form:
xoxc-*************-*************-*************-????????????????????????????????????????
Where *
is a numeric and ?
is an alphanumeric character
Also, set the coookie
variable to the d
cookie/token:
d=xoxd-??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
(Both can be extracted using the slacktokens) python package
Then, set the channel
variable to the internal channel id of the channel you want to scrape.
(Find a channel's id by looking it up through the slack web client. Click on any channel then copy the ending of the URL, of the form C0?????????
. Or use the test tool in the Slack API documentation)
then set the channelName
to the name you want for the output folder.
Finally, in the console, cd
into the directory and run:
$ node app.js
then open data/${channel}_${channelName}/history.html
in a browser.