{"id":21659740,"url":"https://github.com/DzenanJupic/rustube","last_synced_at":"2025-07-17T22:32:59.366Z","repository":{"id":38980530,"uuid":"323105290","full_name":"DzenanJupic/rustube","owner":"DzenanJupic","description":"A YouTube video downloader, originally inspired by pytube, written in Rust.","archived":false,"fork":false,"pushed_at":"2024-07-05T10:35:36.000Z","size":295,"stargazers_count":228,"open_issues_count":17,"forks_count":41,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-11-23T17:14:42.717Z","etag":null,"topics":["rust","youtube","youtube-downloader"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DzenanJupic.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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}},"created_at":"2020-12-20T15:38:24.000Z","updated_at":"2024-11-17T03:41:14.000Z","dependencies_parsed_at":"2024-06-20T01:55:53.645Z","dependency_job_id":"85245c24-a499-4007-b948-e0da8ba107a4","html_url":"https://github.com/DzenanJupic/rustube","commit_stats":{"total_commits":239,"total_committers":11,"mean_commits":"21.727272727272727","dds":"0.31799163179916323","last_synced_commit":"34eaad54d1a2ee1a9bb6d7d0af91db31819205a4"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DzenanJupic%2Frustube","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DzenanJupic%2Frustube/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DzenanJupic%2Frustube/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DzenanJupic%2Frustube/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DzenanJupic","download_url":"https://codeload.github.com/DzenanJupic/rustube/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226305722,"owners_count":17603863,"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":["rust","youtube","youtube-downloader"],"created_at":"2024-11-25T09:31:27.544Z","updated_at":"2024-11-25T09:33:30.013Z","avatar_url":"https://github.com/DzenanJupic.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# \u003cdiv align=\"center\"\u003e rustube \u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![crates.io](https://img.shields.io/crates/v/rustube?style=flat-square)](https://crates.io/crates/rustube)\n[![docs.rs](https://img.shields.io/docsrs/rustube?style=flat-square)](https://docs.rs/rustube)\n[![licence](https://img.shields.io/crates/l/rustube?style=flat-square)](https://github.com/DzenanJupic/rustube)\n\n![build](https://img.shields.io/github/workflow/status/DzenanJupic/rustube/Check%20and%20Build%20code%20on%20all%20major%20operating%20systems?style=flat-square)\n![YT download](https://img.shields.io/github/workflow/status/DzenanJupic/rustube/Test%20downloading?label=YT%20download\u0026style=flat-square)\n\n\u003c/div\u003e\n\n---\n\nA complete (WIP), and easy to use YouTube downloader.\n\u003e **Note**: 0.3.5 is a temporary fix to adapt to changes in the YouTube api (#38). Unfortunately this fix does not\n\u003e work for age restricted videos. We are working on a fix for that in #39.\n\n## Overview\n\n- [Roadmap](#roadmap)\n- [Usage](#usage)\n- [CLI](#cli)\n- [Contributing](#contributing)\n\n## Roadmap\n\n- [x] download normal videos\n- [ ] download age restricted videos *(no longer works since 0.3.5 due to a change in the YouTube API)*\n- [x] asynchronous API\n- [x] blocking API\n- [ ] full video info deserialization\n- [ ] feature based opt-in deserialization of video info\n- [x] CLI\n- [x] testing suite\n- [ ] benchmarks\n- [ ] Python bindings\n- [ ] C / C++ bindings\n\n## Usage\n\n`rustube` provides an extremely easy to use API. If you just want to download a video and don't care about any\nintermediate steps and any video information, this is all you need:\n\n```rust\n#[tokio::main]\nasync fn main() {\n    let url = \"https://www.youtube.com/watch?v=Edx9D2yaOGs\u0026ab_channel=CollegeHumor\";\n    println!(\"downloaded video to {:?}\", rustube::download_best_quality(\u0026url).await.unwrap());\n}\n```\n\nOf course, `rustube` has a lot more capabilities than just downloading videos. It also aims at deserializing the\ncomplete video information provided by YouTube (this is still WIP). So finding out the view count of a video is as\nsimple as:\n\n```rust\nuse rustube::{Id, VideoFetcher};\n\nlet id = Id::from_raw(\"https://www.youtube.com/watch?v=Edx9D2yaOGs\u0026ab_channel=CollegeHumor\").unwrap();\nlet descrambler = VideoFetcher::from_id(id.into_owned())\n        .unwrap()\n        .fetch()\n        .await\n        .unwrap();\n\nlet view_count = descrambler.video_details().view_count;\nlet title = descrambler.video_title();\nprintln!(\"The video `{}` was viewed {} times.\", title, view_count);\n```\n\nFor more examples, an overview of the blocking API have a look at the [API documentation].\n\n## CLI\n\n`rustube` comes with a CLI, `rustube-cli`, so you can download your favorite YouTube videos without having to write a\nsingle line of code.\n\nTo install it, simply run\n\n```\ncargo install rustube-cli\n```\n\nAfter you successfully installed `rustube-cli`, you have access to the command `rustube`\n\n```\nA simple CLI for the rustube YouTube-downloader library.\nFor documentation and more information about rustube or the rustube-cli checkout\n`https://github.com/DzenanJupic/rustube`.\n\nFor help with certain subcommands run `rustube \u003cSUBCOMMAND\u003e --help`.\n\nUSAGE:\n    rustube \u003cSUBCOMMAND\u003e\n\nFLAGS:\n    -h, --help       Prints help information\n    -V, --version    Prints version information\n\nSUBCOMMANDS:\n    check       Checks if a video can be downloaded and fetches information about it\n                This command is similar to fetch, in the way that it also fetches information\n                about a video, but, other then fetch, will also decrypt all stream URLs.\n                Therefore you can use the returned URLs for downloading the video. This of\n                course means that the video has to be downloadable.\n                By default this command will check for any streams that contain a video and an\n                audio track. To specify other behavior, like checking for a stream with a\n                particular quality, have a look at the subcommand help.\n    download    Downloads a YouTube video\n                By default, the Stream with the best quality and both a video, and an audio\n                track will be downloaded. To specify other download behavior, have a look the\n                the subcommand help.\n    fetch       Fetches information about a YouTube video\n                Fetching information does not require the video to actually be downloadable. So\n                this also works when a video is, i.e., an offline stream. The downside is that\n                you often don't have access to the stream URLs. Some videos come with pre-\n                decrypted urls, in which case you can also use these to download the video, but\n                if the video url is encrypted there's no way for you to download the video using\n                only the returned information. To get decrypted URLs, have a look at `check`.\n                For most use cases it's recommended to use `check` instead, since it gives you\n                both more control and more information.\n    help        Prints this message or the help of the given subcommand(s)\n```\n\n## Contributing\n\n`rustube` is still in a pretty early stage, and you are welcome to contribute to it! The goal is to utilize the speed,\nthe type system, and the safety of Rust to make the fastest, most reliable, and most complete YouTube downloader out\nthere.\n\nThis project is 100% open source. Any contribution submitted for inclusion in `rustube` by you, shall have both the MIT\nlicence and the Apache-2.0 licence, and shall be licensed as MIT OR Apache-2.0, without any additional terms or\nconditions.\n\n### Licence\n\nThis project is licensed under the terms of the MIT licence or the Apache-2.0 licence, at your own choice.\n\n\n[API documentation]: https://docs.rs/rustube/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDzenanJupic%2Frustube","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDzenanJupic%2Frustube","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDzenanJupic%2Frustube/lists"}