zach-snell / slack-export Goto Github PK
View Code? Open in Web Editor NEWA python slack exporter
License: MIT License
A python slack exporter
License: MIT License
Hello,
This export is compatible with slack export, but for some reason importing it to mattermost does not work. Could someone take a look at this?
Hi All!
I do not have the time or personal need to support this tool currently.
Its it couple years of existence, I have only gotten ~5$ in total donation support.
I really do appreciate that but its not enough for me to dedicate literally any time to this tool unless I was to need it again.
If someone wants to maintain this tool - please let me know. I will review your github/repos you maintain and based on that add you as a maintainer.
Thanks!
I know I can restrict the download to a list of channels, but I have to manually maintain that list.
Therefor it would be nice to have an option to only download data from the slack channels my user is following at the moment and not every public channel. Would this be possible to do?
It would be useful to periodically run this tool, for example as a cron job, and have a daily/monthly incremental snapshot.
For example, given a folder with the previous fetch info, get me all the newer content.
Run
python slack_export.py --token <my_token>
Expected: a directory is created with subdirectories named as
public-channel1
public-channel2
private-channel
<etc.>
Observed: a directory is created with subdirectories named as
b'public-channel1'
b'public-channel2'
private-channel
<etc.>
Nice script, thanks!
I can get it to export my public channels but it aborts on a private channel:
Getting history for Private Channels and Group Messages
getting history for private channel leadership with id GAEV6SYV6
getting history for private channel leadership-archived with id GAGH528MC
Traceback (most recent call last):
File "slack_export.py", line 339, in <module>
getPrivateChannels()
File "slack_export.py", line 214, in getPrivateChannels
parseMessages( groupDir, messages, 'group' )
File "slack_export.py", line 127, in parseMessages
channelRename( oldRoomPath, newRoomPath )
File "slack_export.py", line 89, in channelRename
shutil.move( os.path.join( oldRoomName, fileName ), newRoomName )
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 292, in move
raise Error, "Destination path '%s' already exists" % real_dst
shutil.Error: Destination path 'leadership-archived/.json' already exists
Hi all,
(this isn't really an issue, more of a "look here" if someone needs to dump channels with threads)
I recently wanted to export some private channels, but with all the solutions I tried:
neither of these supported exporting threads (which my channels use heavily).
I know there's some discussion on this, but I setup a new app in the last week (December 22nd), added permissions and successfully got both the lumbric
and cekees
exporters to work. However, the slackclient
-based on was nowhere near successful as the lumbric
one (same token, same everything ... lots of missing private channels).
Anyway, I added support to the lumbric
version for dumping threads:
The export format exactly matches the export format you get if you use Slack's "official" exporter.
Cheers,
Andrew
thank you for special project!!
BTW,
after pip "install slacker",and "pick"
I cannot run slack_export command, because of missing of slack_export.py
Shall I download it .py code and put to accurate place , ( and also path)??
File "slack_export.py", line 342, in <module>
bootstrapKeyValues()
File "slack_export.py", line 237, in bootstrapKeyValues
users = slack.users.list().body['members']
File "/Users/solairerove/Library/Python/2.7/lib/python/site-packages/slacker/__init__.py", line 200, in list
return self.get('users.list', params={'presence': int(presence)})
File "/Users/solairerove/Library/Python/2.7/lib/python/site-packages/slacker/__init__.py", line 117, in get
api, **kwargs
File "/Users/solairerove/Library/Python/2.7/lib/python/site-packages/slacker/__init__.py", line 95, in _request
response.raise_for_status()
File "/Users/solairerove/Library/Python/2.7/lib/python/site-packages/requests/models.py", line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)
It would be great if you can add an optional parameter for the date range. For example, I'd like to export all communications of the last quarter.
Trying to export some DMs from my workspace using app tokens (the new way Slack has of creating them) and finding that I can't export 1:1 DMs that don't have my bot user as one of the two members. Anyone been able to find a workaround/fix for this?
Slack disabled creation of legacy tokens. What is the new method of making this tool work?
I have recently been added to a private channel (few hours ago) and this channel is not visible to the exporter (it doesn't show when I run python3 slack_export.py --token xoxp-3950... --dryRun
. Other private channels are visible. Is there a caching mechanism and/or a way to debug this?
Hi there,
Any plans for updating this amazing tool with the new methods¿?
Traceback (most recent call last):
File "slack_export.py", line 345, in <module>
bootstrapKeyValues()
File "slack_export.py", line 245, in bootstrapKeyValues
channels = slack.channels.list().body['channels']
File "/usr/local/lib/python3.7/site-packages/slacker/__init__.py", line 428, in list
'exclude_members': exclude_members})
File "/usr/local/lib/python3.7/site-packages/slacker/__init__.py", line 120, in get
api, **kwargs
File "/usr/local/lib/python3.7/site-packages/slacker/__init__.py", line 102, in _request
raise Error(response.error)
slacker.Error: method_deprecated
Thanks!
Traceback (most recent call last):
File "./slack_export.py", line 346, in
bootstrapKeyValues()
File "./slack_export.py", line 242, in bootstrapKeyValues
users = slack.users.list().body['members']
File "/usr/local/lib/python3.7/site-packages/slacker/init.py", line 331, in list
return self.get('users.list', params={'presence': int(presence)})
File "/usr/local/lib/python3.7/site-packages/slacker/init.py", line 120, in get
api, **kwargs
File "/usr/local/lib/python3.7/site-packages/slacker/init.py", line 102, in _request
raise Error(response.error)
slacker.Error: limit_required
I can't seem to find any Slack library to backup Slack.
I tried:
python slack_export.py --token xoxs-123...
It's throwing this error:
venv/lib/python3.9/site-packages/slacker/__init__.py", line 102, in _request
raise Error(response.error)
slacker.Error: method_deprecated
It looks like Slack changes it's API and every single backup app out there broke. Can someone confirm this before I give up entirely? Thanks.
Got the following error:
requests.exceptions.HTTPError: 429 Client Error: Too Many Requests for url: https://slack.com/api/groups.history?count=100&token=XXXXXXX&oldest=0&channel=XXXXXXX
Looks like I'm hitting a rate limit. Will look to put up a PR to fix this.
➜ python slack_export.py --token REDACTED --directMessages --zip slack_export_all_DMs
Successfully authenticated for team REDACTED and user REDACTED
Found 462 Users
Found 74 Public Channels
Found 4 Private Channels or Group DMs
Found 76 1:1 DM conversations
Making channels file
Fetching 1:1 DMs with slackbot
➜
Expected behaviour: To iterate through the list of DM conversations, downloading each.
I see a similar problem if I use --prompt
and select a number of conversations - only one seems to be downloaded.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.