It comes through from the environment variable as a string. Fixes this
unhelpful error message:
`TypeError: '<' not supported between instances of 'str' and 'int'`
At some point, Slack started paginating on the export page for teams with huge emoji collections.
This means the export process would only detect the 500 emoji on that first page (ordered alphabetically).
It now looks to other pages and exports those as well, restoring full functionality.
Tested on a team with ~1300 emoji (3 pages).
Makes the export script require Python 3.6.
(async/await were added in 3.5, so maybe there?)
I'll need to tidy it up a bit, but this is v1 of functionality.
Adds -r/--concurrent-requests for throttling. Defaults to 200.
(configured in .env as CONCURRENT_REQUESTS)
Caveats:
- Adds an aiohttp dependency.
- Stops using upload._session, effectively duplicating the
functionality to get access to aiohttp.ClientSession.
- Adds logging to record the files downloaded. Previously silent.
I've also noticed a bug in filename parsing where a bunch of files all
named `apple.png` are created. This script parses the URL to retrieve
the filename, which exposes this duplication. My version does more
parsing in the HTML to detect the :emoji_name: as used by Slack clients.
Currently I'm not addressing this.