[youtube] unescape HTML entities, fix #1462

This commit is contained in:
Mort Yao 2016-10-19 20:47:17 +02:00
parent 455e5b90d9
commit 669d7b5586
No known key found for this signature in database
GPG Key ID: 07DA00CB78203251

View File

@ -236,7 +236,7 @@ class YouTube(VideoExtractor):
start = '{:0>2}:{:0>2}:{:06.3f}'.format(int(h), int(m), s).replace('.', ',') start = '{:0>2}:{:0>2}:{:06.3f}'.format(int(h), int(m), s).replace('.', ',')
m, s = divmod(finish, 60); h, m = divmod(m, 60) m, s = divmod(finish, 60); h, m = divmod(m, 60)
finish = '{:0>2}:{:0>2}:{:06.3f}'.format(int(h), int(m), s).replace('.', ',') finish = '{:0>2}:{:0>2}:{:06.3f}'.format(int(h), int(m), s).replace('.', ',')
content = text.firstChild.nodeValue content = unescape_html(text.firstChild.nodeValue)
srt += '%s\n' % str(seq) srt += '%s\n' % str(seq)
srt += '%s --> %s\n' % (start, finish) srt += '%s --> %s\n' % (start, finish)