TW Comments
A CLI tool to get comments from Youtube and repost them in a Slack channel.
Installation
pip3 install tw-comments
Usage
You need three things to use this tool:
- A Youtube API key
- A Youtube playlist ID
- A Slack webhook URL
Youtube API key
You can get a Youtube API key by following the instructions here.
Youtube playlist ID
You can get a Youtube playlist ID by following the instructions here.
Slack webhook URL
You can get a Slack webhook URL by following the instructions here.
Run the tool
This is a example of how to run the tool to get the comments of all videos and repost them in a Slack channel:
tw-comments youtube --send-to=slack --youtube-api-key=your-youtube-api-key --youtube-playlist-id=your-youtube-playlist-id --slack-webhook-url=your-slack-webhook-url
You can also run the tool to send the comments to the standard output, in the case you don't need to pass the --slack-webhook-url argument:
tw-comments youtube --send-to=stdout --youtube-api-key=your-youtube-api-key --youtube-playlist-id=your-youtube-playlist-id
The tool will create a file called last_execution.txt in the current directory. This file will be used to get the last execution date and time. This way, the tool will only get the comments of the videos that were uploaded after the last execution. If you want to change the path of this file, you can use the --last-execution-filename argument:
tw-comments youtube --send-to=slack --youtube-api-key=your-youtube-api-key --youtube-playlist-id=your-youtube-playlist-id --slack-webhook-url=your-slack-webhook-url --last-execution-filename=/path/to/last_execution.txt
Metadata
Release files for tw-comments 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tw_comments-0.1.3.tar.gz | 5.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tw_comments-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.1 kB
Release files / tw_comments-0.1.3.tar.gz
| Download URL | tw_comments-0.1.3.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b7cb66b5d30eefd8642ad1c20bc3410786e08ddecd2cbc52a166ef0c4d0bf588
|
|
BLAKE2b-256 checksum How to use checksums |
b93b242fc9806b79a103bf1749d63ad0e4836fcb483533785d1a086f877028e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.1 CPython/3.10.6 Linux/5.19.0-35-generic
|
Release files / tw_comments-0.1.3-py3-none-any.whl
| Download URL | tw_comments-0.1.3-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f3de0c0f9bbff1be14a204ca367e7ebff6891aa2d191bd582ebf74536eb6f9cb
|
|
BLAKE2b-256 checksum How to use checksums |
5b93a4d802542302b00fb71fee4c05030d9ec2b3c72a116691aecf32bf3208ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.1 CPython/3.10.6 Linux/5.19.0-35-generic
|