forked from smashwilson/slack-emojinator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial implementation of aiohttp export
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.
- Loading branch information
Showing
3 changed files
with
60 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
beautifulsoup4>=4.4, <5.0 | ||
requests>=2.5.3, <3.0 | ||
lxml==3.7.3 | ||
aiohttp==2.3.1 |