daretogo / slackscrape

scrape messages from slack channels

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

slackscrape

WARNING

Slack is deprecating the API tokens that this project uses, you will not be able to issue them after May 2020. This project is dependent on version 1.x of the python "slackclient" API You'll want to install the latest 1.x - pip3 install -Iv slackclient==1.2.1

Usage

Add your slack token credentials to env.json in project root

eg:

{
  "token": "xxxxxx-XXXXXXXX-XXXXXXXX-xxxxxxxx"
}

Additionally your "channel id" and "output" location (full path to Json output file) need to be specified in the env.json

slackscrape

python slackscrape.py -c [channel id]

eg: `python slackscrape.py -c C193MSB9J

will write channel messages to general.json in output/channels/general/messages/

get channels messages

python get\_channels\_messages.py -u [optional update existing] -a [optional include archived]

eg: `python get_channels_messages.py -u

Will get all channels messages and update with any new messages it finds and write to output/channels/<channel>/messages/<channel>.json

get channels info

python get\_channels\_info.py -u [optional update existing]

eg: `python get_channels_info.py -u

Will get all channels metadata and write to output/channels/<channel>/info/<channel>.json

get users

python get\_users.py -u [optional update existing]

eg: `python get_users.py -u

Will get all users and write to output/users/members/<user>.json

count emojis

python count_emojis.py

Extracts all messages from all chanenls and does a team-wide breakdown of the top 50 most popular emojis & reactions.

Dependencies

pip install slackclient

About

scrape messages from slack channels


Languages

Language:Python 100.0%