ox.web.youtube: use in/out/value like ox.srt, decode html value
This commit is contained in:
parent
575549ae33
commit
2456ec2d5a
1 changed files with 4 additions and 3 deletions
|
@ -7,6 +7,7 @@ import re
|
|||
from xml.dom.minidom import parseString
|
||||
|
||||
import feedparser
|
||||
import ox
|
||||
from ox.cache import read_url, cache_timeout
|
||||
|
||||
|
||||
|
@ -93,9 +94,9 @@ def info(id):
|
|||
end = start + float(duration)
|
||||
text = t.firstChild.data
|
||||
subs.append({
|
||||
'start': start,
|
||||
'end': end,
|
||||
'value': text,
|
||||
'in': start,
|
||||
'out': end,
|
||||
'value': ox.decode_html(text),
|
||||
})
|
||||
info['subtitles'][language] = subs
|
||||
return info
|
||||
|
|
Loading…
Reference in a new issue