twitter-video-tools


Nametwitter-video-tools JSON
Version 2023.4.15 PyPI version JSON
download
home_pagehttps://github.com/code-yeongyu/twitter_video_tools
SummaryTwitter Video Tools is a multi-processing supported video downloader, supports videos from twitter (or specific user from twitter) && monsnode.
upload_time2023-04-15 09:21:10
maintainer
docs_urlNone
author
requires_python>=3.9,<4.0
licenseMIT
keywords crawler parser downloader monsnode twitter youtube_dl
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            **This project is deprecated. Please look at <https://github.com/code-yeongyu/twitter_video_tools_v2>** 

# Twitter Video Tools


[![PyPI version](https://badge.fury.io/py/twitter-video-tools.svg)](https://badge.fury.io/py/twitter-video-tools)
[![Test](https://github.com/code-yeongyu/twitter_video_tools/actions/workflows/test.yaml/badge.svg?branch=master)](https://github.com/code-yeongyu/twitter_video_tools/actions/workflows/test.yaml)
[![codecov](https://codecov.io/gh/code-yeongyu/TwitterVideoTools/branch/master/graph/badge.svg?token=97K8BBWOH7)](https://codecov.io/gh/code-yeongyu/TwitterVideoTools)

- A multi-processing supported video downloader
- supports downloading videos from twitter (or specific user from twitter) && monsnode.

## Install

### with PIP

```sh
pip install twitter-video-tools
```

### with Poetry

```sh
poetry add twitter-video-tools
```

## Usage

### Command line

```sh
python3 -m twitter_video_tools [link]
```

Supported link types:

- Video tweet: <https://twitter.com/twtvtOfficial/status/1599748329927499777>
- Video from [monsnode](https://monsnode.com): <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

```python
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
  - vscode ready (launching, debugging, formatting)
  - strict type checking using [mypy](https://github.com/python/mypy) & [pyright](https://github.com/microsoft/pyright)
    - type hint generator [monkeytype](https://github.com/Instagram/MonkeyType) also included
  - amazing linters & formatters ([`yapf`](https://github.com/google/yapf), [`pylint`](https://github.com/PyCQA/pylint), [`isort`](https://github.com/PyCQA/isort))
    - `unify` for forcing single-quote
  - unit test using [`pytest`](https://github.com/myint/unify)

- GitHub Actions
  - [All PRs are statically analyzed & checked by `yapf`, `pylint`, `pyright`, `mypy`](https://github.com/code-yeongyu/TwitterVideoTools/actions/workflows/check_code.yaml)
  - [All PRs are tested with `pytest`](https://github.com/code-yeongyu/TwitterVideoTools/actions/workflows/test.yaml)
  - [Can be released with Github Action when creating GitHub Releases](https://github.com/code-yeongyu/TwitterVideoTools/actions/workflows/release.yaml)

### All-in-one

```sh
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

```sh
poetry shell
inv test
```

## Inspirations

### [yt-dlp](https://github.com/yt-dlp/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](https://playwright.dev/python/)

- 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](https://typer.tiangolo.com/)

- 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](https://github.com/microsoft/pyright) & [mypy](http://mypy-lang.org/) & [monkeytype](https://github.com/Instagram/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](https://github.com/code-yeongyu/python3.9-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
- This project is also based on this template.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/code-yeongyu/twitter_video_tools",
    "name": "twitter-video-tools",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9,<4.0",
    "maintainer_email": "",
    "keywords": "crawler,parser,downloader,monsnode,twitter,youtube_dl",
    "author": "",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/66/fe/26a6fa971ba3725f24dfd0c1741c764674c6460b9da60e219b810928ffd0/twitter_video_tools-2023.4.15.tar.gz",
    "platform": null,
    "description": "**This project is deprecated. Please look at <https://github.com/code-yeongyu/twitter_video_tools_v2>** \n\n# Twitter Video Tools\n\n\n[![PyPI version](https://badge.fury.io/py/twitter-video-tools.svg)](https://badge.fury.io/py/twitter-video-tools)\n[![Test](https://github.com/code-yeongyu/twitter_video_tools/actions/workflows/test.yaml/badge.svg?branch=master)](https://github.com/code-yeongyu/twitter_video_tools/actions/workflows/test.yaml)\n[![codecov](https://codecov.io/gh/code-yeongyu/TwitterVideoTools/branch/master/graph/badge.svg?token=97K8BBWOH7)](https://codecov.io/gh/code-yeongyu/TwitterVideoTools)\n\n- A multi-processing supported video downloader\n- supports downloading videos from twitter (or specific user from twitter) && monsnode.\n\n## Install\n\n### with PIP\n\n```sh\npip install twitter-video-tools\n```\n\n### with Poetry\n\n```sh\npoetry add twitter-video-tools\n```\n\n## Usage\n\n### Command line\n\n```sh\npython3 -m twitter_video_tools [link]\n```\n\nSupported link types:\n\n- Video tweet: <https://twitter.com/twtvtOfficial/status/1599748329927499777>\n- Video from [monsnode](https://monsnode.com): <https://monsnode.com/v1506575871309589251>\n- Specific user's uploaded videos: <https://twitter.com/twtvtOfficial/media>\n- Specific user's liked videos: <https://twitter.com/twtvtOfficial/likes>\n\n### Python Embedding\n\n```python\nfrom twitter_video_tools import TwitterVideoTools\n\nwith TwitterVideoTools() as twitter_video_tools:\n    twitter_video_tools.download_from_user('twtvtOfficial')\n```\n\n## Contribution\n\n### Prerequisites\n\n- Python 3.9\n- poetry\n- code editor (vscode recommended)\n\n### Overview of Development Environments\n\n- Local\n  - vscode ready (launching, debugging, formatting)\n  - strict type checking using [mypy](https://github.com/python/mypy) & [pyright](https://github.com/microsoft/pyright)\n    - type hint generator [monkeytype](https://github.com/Instagram/MonkeyType) also included\n  - amazing linters & formatters ([`yapf`](https://github.com/google/yapf), [`pylint`](https://github.com/PyCQA/pylint), [`isort`](https://github.com/PyCQA/isort))\n    - `unify` for forcing single-quote\n  - unit test using [`pytest`](https://github.com/myint/unify)\n\n- GitHub Actions\n  - [All PRs are statically analyzed & checked by `yapf`, `pylint`, `pyright`, `mypy`](https://github.com/code-yeongyu/TwitterVideoTools/actions/workflows/check_code.yaml)\n  - [All PRs are tested with `pytest`](https://github.com/code-yeongyu/TwitterVideoTools/actions/workflows/test.yaml)\n  - [Can be released with Github Action when creating GitHub Releases](https://github.com/code-yeongyu/TwitterVideoTools/actions/workflows/release.yaml)\n\n### All-in-one\n\n```sh\ngh repo clone code-yeongyu/twitter_video_tools\npython3 -m pip install poetry\npoetry install # install dependencies\ncode --install-extension emeraldwalk.RunOnSave # to force single quote\ncode --install-extension tamasfe.even-better-toml # for handling toml\n```\n\nDone!\n\n### Test\n\n```sh\npoetry shell\ninv test\n```\n\n## Inspirations\n\n### [yt-dlp](https://github.com/yt-dlp/yt-dlp)\n- Inspired me to start this project. yt-dlp is a fork project of youtube-dl.\n- Since the cookie option of yt-dlp's twitter extractor is not working, I decided to make my own project, using browser automation.\n\n### [playwright](https://playwright.dev/python/)\n\n- Microsoft's browser automation module.\n- Another major project to made me to start this project. I made up my mind to make TwitterVideoTools to experience playwright.\n- 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.\n\n### [typer](https://typer.tiangolo.com/)\n\n- Ever since I started this project, I always wanted to support CLI with typer's awesome development experience.\n- TwitterVideoTools' CLI is written with typer, and it is so beautiful and easy to use at the same time.\n\n### [pyright](https://github.com/microsoft/pyright) & [mypy](http://mypy-lang.org/) & [monkeytype](https://github.com/Instagram/MonkeyType)\n\n- These three tools helped me to write fully-typed python code.\n- I won't start my python project without these tools.\n\n### [my python project template](https://github.com/code-yeongyu/python3.9-project-template)\n\n- I made this template to make my python project development experience better.\n  - Safe & Convient development environment\n    - Strict type checking\n    - Amazing linters & formatters\n    - Unit test supported\n- This project is also based on this template.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Twitter Video Tools is a multi-processing supported video downloader, supports videos from twitter (or specific user from twitter) && monsnode.",
    "version": "2023.4.15",
    "split_keywords": [
        "crawler",
        "parser",
        "downloader",
        "monsnode",
        "twitter",
        "youtube_dl"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "50fb4d91c7fe7ae798a41946f4f30c6201be04059b8351f70be2598a68f75b86",
                "md5": "2154b94872b4a99126e7c6d74870ea04",
                "sha256": "59a0211ecc9c5c5a323e799a82694e066a4bcc2ea056d3d8e2c6571b0abf0594"
            },
            "downloads": -1,
            "filename": "twitter_video_tools-2023.4.15-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2154b94872b4a99126e7c6d74870ea04",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9,<4.0",
            "size": 13621,
            "upload_time": "2023-04-15T09:21:08",
            "upload_time_iso_8601": "2023-04-15T09:21:08.719223Z",
            "url": "https://files.pythonhosted.org/packages/50/fb/4d91c7fe7ae798a41946f4f30c6201be04059b8351f70be2598a68f75b86/twitter_video_tools-2023.4.15-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "66fe26a6fa971ba3725f24dfd0c1741c764674c6460b9da60e219b810928ffd0",
                "md5": "fb5f889fc6d2bd64c2a24328d984e247",
                "sha256": "ac4344a7a85d0440c3cc51d10d5bd2c5285650d08c846a54cd317b3f87356ac0"
            },
            "downloads": -1,
            "filename": "twitter_video_tools-2023.4.15.tar.gz",
            "has_sig": false,
            "md5_digest": "fb5f889fc6d2bd64c2a24328d984e247",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9,<4.0",
            "size": 11240,
            "upload_time": "2023-04-15T09:21:10",
            "upload_time_iso_8601": "2023-04-15T09:21:10.129467Z",
            "url": "https://files.pythonhosted.org/packages/66/fe/26a6fa971ba3725f24dfd0c1741c764674c6460b9da60e219b810928ffd0/twitter_video_tools-2023.4.15.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-15 09:21:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "code-yeongyu",
    "github_project": "twitter_video_tools",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "twitter-video-tools"
}
        
Elapsed time: 0.08122s