{"id":25328501,"url":"https://github.com/profanitas/ytsapi","last_synced_at":"2025-04-08T02:49:58.312Z","repository":{"id":57478080,"uuid":"209060448","full_name":"profanitas/YTSAPI","owner":"profanitas","description":"YouTube Transcribe API for The Abuse Project","archived":false,"fork":false,"pushed_at":"2019-12-20T09:37:59.000Z","size":15,"stargazers_count":1,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-08T02:49:53.921Z","etag":null,"topics":["python-library","python3","theabuseproject","video-downloader","youtube-api","youtube-downloader"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/profanitas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-17T13:23:30.000Z","updated_at":"2024-06-03T02:01:56.000Z","dependencies_parsed_at":"2022-09-18T20:21:38.401Z","dependency_job_id":null,"html_url":"https://github.com/profanitas/YTSAPI","commit_stats":null,"previous_names":["theabuseproject/ytsapi"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/profanitas%2FYTSAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/profanitas%2FYTSAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/profanitas%2FYTSAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/profanitas%2FYTSAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/profanitas","download_url":"https://codeload.github.com/profanitas/YTSAPI/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247767252,"owners_count":20992541,"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":["python-library","python3","theabuseproject","video-downloader","youtube-api","youtube-downloader"],"created_at":"2025-02-14T02:34:13.636Z","updated_at":"2025-04-08T02:49:58.289Z","avatar_url":"https://github.com/profanitas.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YTSAPI\n\nYTSAPI (YouTube Transcribe API) for **[The Abuse Project](https://github.com/theabuseproject)** is a python API (Application Programming Interface) which allows you to get the transcript/subtitle for a given YouTube video in a nice list consisting of dictionaries. It also works for videos which have automatically generated subtitles. It does not use any _hacky mechanisms_.\n\n## Install\n\nFor using this library in your project, simple use `pip` to install the module.\n\n```\npip install ytsapi\n```\n\nThe module published is in it's early stage as of now, as it's being used internally in **The Abuse Project**. If you want to develop it further, you'll have to use this source repository.\n\n```\ngit clone https://github.com/theabuseproject/YTSAPI.git\n```\n\nAfter cloning, install the dependencies using pip,\n\n```\npip install -r requirements.txt\n```\n## Usage\n\nThe implemented API class can be found under `ytsapi/ytsapi.py`.\n\n```python\nimport ytsapi\nytsapi.YTSAPI.get_transcript(\"Youtube Video ID\")\n```\n\n#### Example Usage\n\n#### Obtaining transcript of a YouTube video\n\n```python\n\u003e\u003e\u003e import ytsapi\n\u003e\u003e\u003e video = 'http://www.youtube.com/watch?v=BaW_jenozKc'\n\u003e\u003e\u003e video_id = video.split('?v=')[1]\n\u003e\u003e\u003e video_subtitles = ytsapi.YTSAPI.get_transcript(video_id)\n\u003e\u003e\u003e print(video_subtitles)\n[{'text': 'This a test video\\nfor youtube-dl', 'start': 0.26, 'duration': 3.33}, {'text': 'For more information\\ncontact phihag@phihag.de', 'start': 3.59, 'duration': 6.08}]\n\u003e\u003e\u003e\n\u003e\u003e\u003e type(video_subtitles)\n\u003cclass 'list'\u003e\n\u003e\u003e\u003e type(video_subtitles[0])\n\u003cclass 'dict'\u003e\n\u003e\u003e\u003e\n```\n\n#### Downloading a YouTube video\n\n```python\n\u003e\u003e\u003e import ytsapi\n\u003e\u003e\u003e ytsapi.YTSAPI.get_video('BaW_jenozKc')\nYoutubeDL - Starting the download (BaW_jenozKc)\n[youtube] BaW_jenozKc: Downloading webpage\n[youtube] BaW_jenozKc: Downloading video info webpage\nWARNING: Unable to extract video title\n[download] BaW_jenozKc.mp4 has already been downloaded\n[download] 100% of 1.74MiB\n[youtube] BaW_jenozKc: Downloading webpage\n[youtube] BaW_jenozKc: Downloading video info webpage\nWARNING: Unable to extract video title\n[download] BaW_jenozKc.mp4 has already been downloaded\n[download] 100% of 1.74MiB\nYoutubeDL - Writing video in current working directory.\nYoutubeDL - Done.\n\u003e\u003e\u003e\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprofanitas%2Fytsapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprofanitas%2Fytsapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprofanitas%2Fytsapi/lists"}