{"id":20862361,"url":"https://github.com/nichind/pybalt","last_synced_at":"2025-05-12T09:31:25.513Z","repository":{"id":259596258,"uuid":"879036012","full_name":"nichind/pybalt","owner":"nichind","description":"☄️ Your ultimate tool \u0026 python module to download videos and audio from various platforms. Supports YouTube, Instagram, Twitter (X), Reddit, TikTok, BiliBili \u0026 More! Powered by cobalt instances","archived":false,"fork":false,"pushed_at":"2025-04-29T12:01:18.000Z","size":35391,"stargazers_count":19,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-29T13:22:33.049Z","etag":null,"topics":["bilibili-download","cli","cli-app","cobalt","cobalt-api","cobalt-tools","download-video","downloader","downloader-for-youtube","instagram","instagram-download","python","python-module","reddit-downloader","terminal-based","twitter","twitter-download","x-downloader-video","youtube","youtube-download"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/pybalt/","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/nichind.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-10-26T19:35:37.000Z","updated_at":"2025-04-21T09:18:39.000Z","dependencies_parsed_at":"2024-10-26T20:08:30.427Z","dependency_job_id":"6ce73d38-d2e8-4099-8206-ba8d11c60f35","html_url":"https://github.com/nichind/pybalt","commit_stats":null,"previous_names":["nichind/pybalt"],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nichind%2Fpybalt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nichind%2Fpybalt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nichind%2Fpybalt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nichind%2Fpybalt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nichind","download_url":"https://codeload.github.com/nichind/pybalt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253709142,"owners_count":21951108,"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":["bilibili-download","cli","cli-app","cobalt","cobalt-api","cobalt-tools","download-video","downloader","downloader-for-youtube","instagram","instagram-download","python","python-module","reddit-downloader","terminal-based","twitter","twitter-download","x-downloader-video","youtube","youtube-download"],"created_at":"2024-11-18T05:20:55.506Z","updated_at":"2025-05-12T09:31:20.478Z","avatar_url":"https://github.com/nichind.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\" style=\"display: flex; flex-flow: column wrap;\"\u003e\n  \u003cimg src='./assets/logo.png' style='border-radius: 8px; width: 124px'\u003e\u003c/img\u003e\n  \u003ch3\u003epybalt\u003c/h3\u003e\n  \u003ch5\u003eCLI tool and python module for downloading media through Cobalt processing instances.\u003c/h5\u003e\n  \n  [![Get on PyPI](https://img.shields.io/pypi/v/pybalt.svg)](https://pypi.org/project/pybalt/)\n  [![Last commit](https://img.shields.io/github/last-commit/nichind/pybalt.svg)](https://github.com/nichind/pybalt)\n  [![Pip module installs total downloads](https://img.shields.io/pypi/dm/pybalt.svg)](https://pypi.org/project/pybalt/)\n  [![GitHub stars](https://img.shields.io/github/stars/nichind/pybalt.svg)](https://github.com/nichind/pybalt)\n  [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n\n  \u003cdiv align=\"center\" style=\"display: flex; flex-flow: column wrap;\"\u003e\n  \u003ch3\u003eCLI Preview\u003c/h3\u003e\n\n  https://github.com/user-attachments/assets/cf5fd9a9-520b-4970-b8c2-42baa80d7523\n  \u003c/div\u003e\n  \n\u003c/div\u003e\n\u003cbr\u003e\u003cbr\u003e\n\u003ch1\u003eInstallation\u003c/h1\u003e\n\u003ch4\u003eInstall pybalt using PowerShell on Windows\u003c/h4\u003e\n\nDownloads [install.bat](./install.bat) and executes it.\n```powershell\npowershell -Command \"Invoke-WebRequest -Uri https://raw.githubusercontent.com/nichind/pybalt/main/install.bat -OutFile install.bat; .\\install.bat\"\n```\n\n\u003ch4\u003eInstall using PIP\u003c/h4\u003e\n\n```shell\npip install pybalt\n```  \n\nThis should create aliases `pybalt` and `cobalt` in your shell.\n\nTry running `cobalt -h` to see the help message.\n\nIf for some reason it didn't work, try using it directly from python package:\n\n```shell\npython -m pybalt\n```\n\u003cbr\u003e\u003cbr\u003e\n\u003ch1\u003eUsage \u0026 Examples\u003c/h1\u003e\n\n\u003cimg src='./assets/cli-preview.gif' style='border-radius: 8px'\u003e\u003c/img\u003e\n\n\u003ch3\u003eSelecting processing instance\u003c/h3\u003e\n\nYou can set **processing instance URL**, **API key**, and **user-agent** as environment variables; pybalt will use them if none are provided.\n\n```\nCOBALT_API_URL=YOUR_INSTANCE_URL\nCOBALT_API_KEY=YOUR_API_KEY\nCOBALT_USER_AGENT=YOUR_USER_AGENT\n```\n\n\u003e By default, pybalt attempts to use any available instance for you provided by [public list of instances](https://instances.cobalt.best). It is recommended to host your own instance or request an `API key` from someone else's instance.\n\n\u003cbr\u003e\n\u003ch2\u003eAs a CLI\u003c/h2\u003e\n\u003cdetails open\u003e\n\u003csummary\u003e\u003c/summary\u003e\n\nEvery command here uses the `cobalt` alias; you can also use `pybalt` or `python -m pybalt`.\n\nBy default, all downloads are saved in the user's downloads folder `~/Downloads`, or the one specified by the `-f` (`-folder`) flag.\n\nGet a list of all available commands by running:\n\n```shell\ncobalt -h\n```\n\n\u003cbr\u003e\n\u003ch3\u003eDownload video from URL\u003c/h3\u003e\n\n```shell\ncobalt -u 'https://youtube.com/watch?v=8ZP5eqm4JqM'\n```\n\nYou can also provide the URL as a positional argument:\n\n```shell\ncobalt 'https://youtube.com/watch?v=8ZP5eqm4JqM'\n```\n\n\u003cbr\u003e\n\u003ch3\u003eDownload YouTube playlist\u003c/h3\u003e\n\n```shell\ncobalt -pl 'https://youtube.com/playlist?list=PL_93TBqf4ymR9GsuI9W4kQ-G3WM7d2Tqj'\n```\n\n\u003cbr\u003e\n\u003ch3\u003eDownload from text file\u003c/h3\u003e\n\nCreate a text file with URLs on each line:\n\n```txt\nhttps://youtube.com/watch?v=8ZP...\n.....\n....\n...\n```\n\nThen run:\n\n```shell\ncobalt -l 'path/to/file.txt'\n```\n\n\u003cbr\u003e\n\u003ch3\u003eMore examples\u003c/h3\u003e\n\nDownload all videos from a YouTube playlist in `720p` to folder `/Music/`, with filename style `classic`, using instance `https://dwnld.nichind.dev` and `API key` authorization:\n\n```shell\ncobalt -pl 'https://youtube.com/playlist?list=PL_93TBqf4ymR9GsuI9W4kQ-G3WM7d2Tqj' -q 720 -f './Music/' -fs 'classic' -i 'https://dwnld.nichind.dev' -k 'YOUR_API_KEY'\n```\n\n\u003c/details\u003e\n\u003cbr\u003e\u003cbr\u003e\n\u003ch2\u003eAs a module\u003c/h2\u003e\n\u003cdetails open\u003e\n\u003csummary\u003e\u003c/summary\u003e\n\n\u003ch3\u003eDownload video from URL\u003c/h3\u003e\n\n```python\nfrom pybalt import Cobalt\nfrom asyncio import run\n\nasync def main():\n    cobalt = Cobalt()\n    path = await cobalt.download('https://youtube.com/watch?v=8ZP5eqm4JqM')\n    print('Downloaded: ', path)  # Downloaded: /Users/%USER%/Downloads/8ZP5eqm4JqM.mp4\n\nrun(main())\n```\n\nYou can pass arguments inside the Cobalt object:\n\n```python\nfrom pybalt import Cobalt\nfrom asyncio import run\n\nasync def main():\n    cobalt = Cobalt(api_instance='YOUR_INSTANCE_URL', api_key='YOUR_API_KEY', headers={...})\n    path = await cobalt.download(url='https://youtube.com/watch?v=8ZP5eqm4JqM', quality='1080')\n    print('Downloaded: ', path)  # Downloaded: /Users/%USER%/Downloads/8ZP5eqm4JqM.mp4\n\nrun(main())\n``` \n\n\u003c/details\u003e\n\n\u003cbr\u003e\u003cbr\u003e\n\u003ch1\u003eContributing\u003c/h1\u003e\n\nIf you have any questions or suggestions, please [open an issue](https://github.com/nichind/pybalt/issues) or [create a pull request](https://github.com/nichind/pybalt/pulls).\n\n\u003ch3\u003eContributors\u003c/h3\u003e\n\n\u003cimg src=\"https://contrib.rocks/image?repo=nichind/pybalt\" alt=\"Contributors\" style=\"max-width: 100%;\"/\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnichind%2Fpybalt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnichind%2Fpybalt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnichind%2Fpybalt/lists"}