Twitter Video Tools is a multi-processing supported video downloader, supports videos from twitter (or specific user from twitter) && monsnode.
Project description
Twitter Video Tools
- A multi-processing supported video downloader
- supports downloading videos from twitter (or specific user from twitter) && monsnode.
Install
with PIP
pip install twitter-video-tools
with Poetry
poetry add twitter-video-tools
Usage
Command line
python3 -m twitter_video_tools [link]
Supported link types:
- Video tweet: https://twitter.com/twtvtOfficial/status/1599748329927499777
- Video from monsnode: https://monsnode.com/v1506575871309589251
- Specific user's uploaded videos: https://twitter.com/twtvtOfficial/media
- Specific user's liked videos: https://twitter.com/twtvtOfficial/likes
Python Embedding
from twitter_video_tools import TwitterVideoTools
with TwitterVideoTools() as twitter_video_tools:
twitter_video_tools.download_from_user('twtvtOfficial')
Contribution
Prerequisites
- Python 3.9
- poetry
- code editor (vscode recommended)
Overview of Development Environments
-
Local
-
GitHub Actions
All-in-one
gh repo clone code-yeongyu/twitter_video_tools
python3 -m pip install poetry
poetry install # install dependencies
code --install-extension emeraldwalk.RunOnSave # to force single quote
code --install-extension tamasfe.even-better-toml # for handling toml
Done!
Test
poetry shell
inv test
Inspirations
yt-dlp
- Inspired me to start this project. yt-dlp is a fork project of youtube-dl.
- Since the cookie option of yt-dlp's twitter extractor is not working, I decided to make my own project, using browser automation.
playwright
- Microsoft's browser automation module.
- Another major project to made me to start this project. I made up my mind to make TwitterVideoTools to experience playwright.
- It would be so painful to imagine making this project with selenium, but I enjoyed a lot while writing the twitter crawler part thanks to playwright.
typer
- Ever since I started this project, I always wanted to support CLI with typer's awesome development experience.
- TwitterVideoTools' CLI is written with typer, and it is so beautiful and easy to use at the same time.
pyright & mypy & monkeytype
- These three tools helped me to write fully-typed python code.
- I won't start my python project without these tools.
my python project template
- I made this template to make my python project development experience better.
- Safe & Convient development environment
- Strict type checking
- Amazing linters & formatters
- Unit test supported
- Safe & Convient development environment
- This project is also based on this template.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for twitter_video_tools-2022.12.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6fd3361a4bd87b2c11608b53527dcbaaae112b9b11c4dd3ecaab818b60462a3 |
|
MD5 | 496aad578d8149dc70af6e0b41f45067 |
|
BLAKE2b-256 | 8a7d4dc7bb7a8b933b1c673be96f85997d94739e1c785d07de80297267a1e91b |
Close
Hashes for twitter_video_tools-2022.12.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 296b4b627cc0b9817e219447d88ae315c645a2baf20a2f73ce259ec8176a2648 |
|
MD5 | 5fb8d20bb230109c899d5484cf9e35d2 |
|
BLAKE2b-256 | 515c9c830e98fe6f258e6dbbd72796a6ba31b8afb00fdf4c918a07431ac02336 |