{"id":16036487,"url":"https://github.com/alexitx/pythumb","last_synced_at":"2025-03-18T03:32:39.486Z","repository":{"id":57457755,"uuid":"317080095","full_name":"alexitx/pythumb","owner":"alexitx","description":"Simple command line utility and API for downloading YouTube thumbnails","archived":false,"fork":false,"pushed_at":"2022-03-04T16:04:25.000Z","size":72,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-15T22:33:38.506Z","etag":null,"topics":["cli","client","command-line","downloader","image","python","thumbnail","thumbnails","utility","youtube"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexitx.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-30T01:29:22.000Z","updated_at":"2024-07-03T19:31:16.000Z","dependencies_parsed_at":"2022-09-07T03:41:31.829Z","dependency_job_id":null,"html_url":"https://github.com/alexitx/pythumb","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexitx%2Fpythumb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexitx%2Fpythumb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexitx%2Fpythumb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexitx%2Fpythumb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexitx","download_url":"https://codeload.github.com/alexitx/pythumb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221706365,"owners_count":16867194,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","client","command-line","downloader","image","python","thumbnail","thumbnails","utility","youtube"],"created_at":"2024-10-08T22:04:59.270Z","updated_at":"2024-10-27T16:45:04.804Z","avatar_url":"https://github.com/alexitx.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyThumb\n\n![version][shields-version]\n![python version][shields-python]\n![python wheel][shields-wheel]\n![license][shields-license]\n\nSimple command line utility and API for downloading YouTube thumbnails.\n\nSupports JPEG and WebP formats in all sizes.\nPreviews (animated thumbnails) are not supported due to the lack of direct URL or API access.\n\nRequires Python 3.6+\n\n## Table of contents\n\n- [Installation](#installation)\n  - [From source](#from-source)\n- [Usage](#usage)\n  - [CLI](#cli)\n  - [API](#api)\n  - [Thumbnail sizes](#thumbnail-sizes)\n- [License](#license)\n\n## Installation\n\nInstall via pip:\n```sh\n$ pip install pythumb\n```\n\nOr get binaries from the [latest release][latest-release].\n\n### From source\n\n###### *Use `python` instead of `python3` on Windows*\n\nDownload source code from the [latest release][latest-release], extract and `cd` into it.\n\n(Optional) Create a [virtual environment][virtual-environment] to manage packages easier.\n\nUpdate pip and setuptools:\n```sh\n$ python3 -m pip install -U pip setuptools\n```\n\nInstall this package:\n```sh\n$ python3 -m pip install .\n```\n\n---\n\nOptionally you can build a standalone executable.\n\nPrerequisites:\n- [Git Bash][git] (Windows)\n\nOn Linux install python3-dev:\n```sh\n$ sudo apt install python3-dev\n```\n\nInstall PyInstaller:\n```sh\n$ python3 -m pip install pyinstaller\n```\n\nRun the build script for your OS:\n```sh\n$ chmod +x ./scripts/build.sh\n$ ./scripts/build.sh \u003cwin / linux\u003e\n```\n\nYou can find the executable in `./pyi-dist/`.\n\n## Usage\n\n### CLI\n\n```sh\n$ pythumb [options] \u003cinput\u003e\n```\n\nTo save a thumbnail to the current directory, simply pass the video URL or 11-character ID (recommended quoted):\n```sh\n$ pythumb \"https://youtu.be/aqz-KE-bpKQ\"\n# or\n$ pythumb \"aqz-KE-bpKQ\"\n```\n\nUse `--help` for more details.\n\n### API\n\n#### Example\n\n```py\nfrom pythumb import Thumbnail\nt = Thumbnail('https://youtu.be/aqz-KE-bpKQ')\nt.fetch()\nt.save('.')\n# ./aqz-KE-bpKQ.jpg\n```\n\n### Thumbnail sizes\n\n| Name            | Size     |\n|-----------------|----------|\n| `maxresdefault` | 1280x720 |\n| `sddefault`     | 640x480  |\n| `hqdefault`     | 480x360  |\n| `mqdefault`     | 320x180  |\n| `default`       | 120x90   |\n\n#### Auto-generated previews (start, middle and end of the video)\n\n| Name      | Size     |\n|-----------|----------|\n| `maxres1` | 1280x720 |\n| `maxres2` | 1280x720 |\n| `maxres3` | 1280x720 |\n| `sd1`     | 640x480  |\n| `sd2`     | 640x480  |\n| `sd3`     | 640x480  |\n| `hq1`     | 480x360  |\n| `hq2`     | 480x360  |\n| `hq3`     | 480x360  |\n| `mq1`     | 320x180  |\n| `mq2`     | 320x180  |\n| `mq3`     | 320x180  |\n| `1`       | 120x90   |\n| `2`       | 120x90   |\n| `3`       | 120x90   |\n\n## License\n\nMIT license. See [LICENSE][license] for more information. \n\n[shields-version]: https://img.shields.io/github/v/tag/alexitx/pythumb?color=e65c5c\u0026label=version\u0026style=flat-square\n[shields-python]: https://img.shields.io/badge/python-3.6--3.10-2996cc?style=flat-square\n[shields-wheel]: https://img.shields.io/pypi/wheel/pythumb?color=7acc29\u0026style=flat-square\n[shields-license]: https://img.shields.io/github/license/alexitx/pythumb?color=e67a45\u0026style=flat-square\n\n[latest-release]: https://github.com/alexitx/pythumb/releases\n[wiki]: https://github.com/alexitx/pythumb/wiki\n[license]: https://github.com/alexitx/pythumb/blob/main/LICENSE\n[git]:https://gitforwindows.org\n[virtual-environment]: https://www.geeksforgeeks.org/creating-python-virtual-environment-windows-linux\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexitx%2Fpythumb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexitx%2Fpythumb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexitx%2Fpythumb/lists"}