Skip to content

Node.js Slack Scraper which works with the latest Slack API.

Notifications You must be signed in to change notification settings

usrnamealreadytaken/slack-scraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Nodejs Slack Scraper Reborn

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.

Prerequisites

Node.js is required in order to run this scraper.

Running the code

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.

About

Node.js Slack Scraper which works with the latest Slack API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published