Skip to content

viazovskyi/getyoutubecc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

DESCRIPTION

This class allows you to download the caption from a video from you tube

PYTHON CLASS USAGE

    Example:
        >>> import getyoutubecc
        #import the library
        >>> cc = getyoutubecc.getyoutubecc('2XraaWefBd8','en')
        # Now in cc.caption_obj are the parsed captions, its syntax is like:
        # [{'texlines': [u"caption first line", 'caption second line'],
        #    'time': {'hours':'1', 'min':'2','sec':44,'msec':232} }]
        # Modify the caption as you want if desired
        >>> cc.writeSrtFile('captionsfile.srt')
        #write the contents to a srt file


COMMAND LINE USAGE

If you prefer the command line version of this, or just to test it:
    $ python getyoutubecc 2XraaWefBd8 9FLItlbBUPY
    And it will download the closed captions of both videos


COPYRIGHT

this code is released into the public domain by the copyright holders.


TODO

- Test the code, different languages in diferent videos for instance
- Improve regular expresion
- Add support for the automatic generate captions service in youtube

About

it fetch closed captions from youtube videos if available

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published