Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mkly/youtube-closed-captions
Python library for downloading closed captions(subtitles) from Youtube
https://github.com/mkly/youtube-closed-captions
Last synced: about 2 months ago
JSON representation
Python library for downloading closed captions(subtitles) from Youtube
- Host: GitHub
- URL: https://github.com/mkly/youtube-closed-captions
- Owner: mkly
- License: other
- Created: 2016-11-07T00:22:28.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-04-17T16:08:41.000Z (over 1 year ago)
- Last Synced: 2024-07-09T16:19:44.076Z (3 months ago)
- Language: Python
- Size: 15.6 KB
- Stars: 57
- Watchers: 3
- Forks: 21
- Open Issues: 6
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
Youtube Closed Captions
-----------------------Downloads the closed captions(subtitles) from Youtube videos
============================================================.. image:: https://circleci.com/gh/mkly/youtube-closed-captions.svg?style=svg
:target: https://circleci.com/gh/mkly/youtube-closed-captionsRequirements
~~~~~~~~~~~~* Currently requires python >= 3.5
To Use
~~~~~~.. code:: python
from ytcc.download import Download
video_id = 'jNQXAC9IVRw'
download = Download()
# Language is optional and default to "en"
# YouTube uses "en","fr" not "en-US", "fr-FR"
captions = download.get_captions(video_id, 'en')Development
===========Run Tests
~~~~~~~~~*Note:* Functional tests do download directly from Youtube
.. code:: bash
## All tests
python -m unittest discover## Unit tests
python -m unittest discover test/unit## Functional tests
python -m unittest discover test/functional