File tree Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Original file line number Diff line number Diff line change 11History
22=======
33
4+ 0.4.3 (22-11-2019) Few improvements
5+ -----------------------------------
6+
7+ * Parsing improvements, thanks to `@sontek <https://github.com/sontek >`_ (#18)
8+ * Add support for reading content from a file-like object, thanks to `@omerholz <https://github.com/omerholz >`_ (#23)
9+ * Documentation fixes thanks to `@sontek <https://github.com/sontek >`_ (#22) and `@netcmcc <https://github.com/netcmcc >`_ (#24)
10+
4110.4.2 (08-06-2018) Rename of modules and usability improvements
512---------------------------------------------------------------
613
Original file line number Diff line number Diff line change @@ -30,6 +30,24 @@ Reading WebVTT caption files
3030 ' crédit de transcription'
3131
3232
33+ Reading WebVTT caption files from file-like object
34+ --------------------------------------------------
35+
36+ .. code-block :: python
37+
38+ import webvtt
39+ import requests
40+ from io import StringIO
41+
42+ payload = requests.get(' http://subtitles.com/1234.vtt' ).text()
43+ buffer = StringIO(payload)
44+
45+ for caption in webvtt.read_buffer(buffer):
46+ print (caption.start)
47+ print (caption.end)
48+ print (caption.text)
49+
50+
3351 Creating captions
3452-----------------
3553
Original file line number Diff line number Diff line change 1- __version__ = '0.4.2 '
1+ __version__ = '0.4.3 '
22
33from .webvtt import *
44from .segmenter import *
You can’t perform that action at this time.
0 commit comments