ox.web.youtube: use in/out/value like ox.srt, decode html value

This commit is contained in:
j 2014-01-15 20:12:14 +05:30
parent 575549ae33
commit 2456ec2d5a

View file

@ -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