import json
import re
-import xml.etree.ElementTree
from .common import InfoExtractor
format_url = (u'http://fs%(server)s.trilulilu.ro/%(hash)s/'
u'video-formats2' % log)
- format_str = self._download_webpage(
+ format_doc = self._download_xml(
format_url, video_id,
note=u'Downloading formats',
errnote=u'Error while downloading formats')
-
- format_doc = xml.etree.ElementTree.fromstring(format_str)
video_url_template = (
u'http://fs%(server)s.trilulilu.ro/stream.php?type=video'
for fnode in format_doc.findall('./formats/format')
]
- info = {
+ return {
'_type': 'video',
'id': video_id,
'formats': formats,
'thumbnail': thumbnail,
}
- # TODO: Remove when #980 has been merged
- info.update(formats[-1])
-
- return info