[archiveorg] Use extract_attributes()
This commit is contained in:
parent
8df0c2c7a5
commit
e910f498d3
@ -2,8 +2,9 @@ from __future__ import unicode_literals
|
|||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
unified_strdate,
|
|
||||||
clean_html,
|
clean_html,
|
||||||
|
extract_attributes,
|
||||||
|
unified_strdate,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -43,9 +44,8 @@ class ArchiveOrgIE(InfoExtractor):
|
|||||||
input_element_with_playlist = self._search_regex(
|
input_element_with_playlist = self._search_regex(
|
||||||
r'(<\s*input.*\s*class\s*=\s*[\'"].*\s*js-play8-playlist\s*.*[\'"]\s*.*>)',
|
r'(<\s*input.*\s*class\s*=\s*[\'"].*\s*js-play8-playlist\s*.*[\'"]\s*.*>)',
|
||||||
webpage, 'jwplayer playlist')
|
webpage, 'jwplayer playlist')
|
||||||
jwplayer_playlist = self._parse_json(self._search_regex(
|
jwplayer_playlist = self._parse_json(extract_attributes(
|
||||||
r'.*\s+value\s*=\s*[\'"](.+)[\'"][\s/]',
|
input_element_with_playlist)['value'], video_id)
|
||||||
input_element_with_playlist, 'playlist data'), video_id)
|
|
||||||
info = self._parse_jwplayer_data(
|
info = self._parse_jwplayer_data(
|
||||||
{'playlist': jwplayer_playlist}, video_id, base_url=url)
|
{'playlist': jwplayer_playlist}, video_id, base_url=url)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user