{ "info": { "author": "Piyush Raj", "author_email": "piyush@linuxmail.org", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3" ], "description": "# 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>>> import ytsapi\n>>> video = 'http://www.youtube.com/watch?v=BaW_jenozKc'\n>>> video_id = video.split('?v=')[1]\n>>> video_subtitles = ytsapi.YTSAPI.get_transcript(video_id)\n>>> 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>>>\n>>> type(video_subtitles)\n\n>>> type(video_subtitles[0])\n\n>>>\n```\n\n#### Downloading a YouTube video\n\n```python\n>>> import ytsapi\n>>> 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>>>\n```\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/theabuseproject/YTSAPI", "keywords": "transcribe-api YTSAPI theabuseproject abuse profanity project youtube-api youtube transcript subtitle youtube-subtitle youtube-transcript api", "license": "", "maintainer": "", "maintainer_email": "", "name": "YTSAPI", "package_url": "https://pypi.org/project/YTSAPI/", "platform": "", "project_url": "https://pypi.org/project/YTSAPI/", "project_urls": { "Homepage": "https://github.com/theabuseproject/YTSAPI" }, "release_url": "https://pypi.org/project/YTSAPI/0.1.1/", "requires_dist": [ "requests", "youtube-dl" ], "requires_python": "", "summary": "YTSAPI is a python API which allows you to get the transcript/subtitle for a given YouTube video.", "version": "0.1.1" }, "last_serial": 5867022, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "27c9be33156bdfa352ac355051c2fab2", "sha256": "19824c184748c67af31c3941a587c9559a40dd5f22f4733bb022f7b9dc733a5d" }, "downloads": -1, "filename": "YTSAPI-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "27c9be33156bdfa352ac355051c2fab2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4419, "upload_time": "2019-09-21T19:19:55", "url": "https://files.pythonhosted.org/packages/86/c2/632012ff0a5e76babc1df115995d02e9b36bce09136cfb1c821475c74676/YTSAPI-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7e4320f6d269bf9bacfa4e5ae7a9371d", "sha256": "b7dce837c6f7287fbda9fe08b93942a4381316ef0baaaf34e31b40789872a7e8" }, "downloads": -1, "filename": "YTSAPI-0.1.0.tar.gz", "has_sig": false, "md5_digest": "7e4320f6d269bf9bacfa4e5ae7a9371d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3839, "upload_time": "2019-09-21T19:19:57", "url": "https://files.pythonhosted.org/packages/4f/d1/e3abb156cc1dc27bc638d092ce74405cbdfc0012d0a2b33f0fe83ce84f17/YTSAPI-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "57a9ee3682355903dc98238fb0f87b11", "sha256": "4ec766918f84f8aa349ee7812a6c95152e35e80a6578f26bad001fdabec677b9" }, "downloads": -1, "filename": "YTSAPI-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "57a9ee3682355903dc98238fb0f87b11", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4875, "upload_time": "2019-09-21T20:02:33", "url": "https://files.pythonhosted.org/packages/4c/61/57cfce4f2a6db056cb8f39f5001b5d836612802559754cbd2579675d83b4/YTSAPI-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "219debfcb98949e880b945329eb433f9", "sha256": "e843fdebd0a9f1d659549951e7159ecca282e9ff7d41b5c52e7beb8cd87f9e0b" }, "downloads": -1, "filename": "YTSAPI-0.1.1.tar.gz", "has_sig": false, "md5_digest": "219debfcb98949e880b945329eb433f9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4350, "upload_time": "2019-09-21T20:02:40", "url": "https://files.pythonhosted.org/packages/7a/18/4c77b02286967c700ac71e49cce5e3f93bc1fe068ca474c1582ca7a45fb9/YTSAPI-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "57a9ee3682355903dc98238fb0f87b11", "sha256": "4ec766918f84f8aa349ee7812a6c95152e35e80a6578f26bad001fdabec677b9" }, "downloads": -1, "filename": "YTSAPI-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "57a9ee3682355903dc98238fb0f87b11", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4875, "upload_time": "2019-09-21T20:02:33", "url": "https://files.pythonhosted.org/packages/4c/61/57cfce4f2a6db056cb8f39f5001b5d836612802559754cbd2579675d83b4/YTSAPI-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "219debfcb98949e880b945329eb433f9", "sha256": "e843fdebd0a9f1d659549951e7159ecca282e9ff7d41b5c52e7beb8cd87f9e0b" }, "downloads": -1, "filename": "YTSAPI-0.1.1.tar.gz", "has_sig": false, "md5_digest": "219debfcb98949e880b945329eb433f9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4350, "upload_time": "2019-09-21T20:02:40", "url": "https://files.pythonhosted.org/packages/7a/18/4c77b02286967c700ac71e49cce5e3f93bc1fe068ca474c1582ca7a45fb9/YTSAPI-0.1.1.tar.gz" } ] }