-from __future__ import unicode_literals
-
import re
from .common import InfoExtractor
HPLEmbedPlayer/\?segmentId=
)
(?P<id>[0-9a-f]+)'''
+ _EMBED_REGEX = [r'<iframe[^>]+?src=(["\'])(?P<url>https?://embed\.live\.huffingtonpost\.com/.+?)\1']
_TEST = {
'url': 'http://live.huffingtonpost.com/r/segment/legalese-it/52dd3e4b02a7602131000677',
def _real_extract(self, url):
video_id = self._match_id(url)
- api_url = 'http://embed.live.huffingtonpost.com/api/segments/%s.json' % video_id
+ api_url = f'http://embed.live.huffingtonpost.com/api/segments/{video_id}.json'
data = self._download_json(api_url, video_id)['data']
video_title = data['title']
'vcodec': 'none' if key.startswith('audio/') else None,
})
- self._sort_formats(formats)
-
return {
'id': video_id,
'title': video_title,