Skip to content

Commit

Permalink
[archiveorg] Use extract_attributes()
Browse files Browse the repository at this point in the history
  • Loading branch information
TinyToweringTree committed Feb 19, 2020
1 parent 8df0c2c commit e910f49
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions youtube_dl/extractor/archiveorg.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

from .common import InfoExtractor
from ..utils import (
unified_strdate,
clean_html,
extract_attributes,
unified_strdate,
)


Expand Down Expand Up @@ -43,9 +44,8 @@ def _real_extract(self, url):
input_element_with_playlist = self._search_regex(
r'(<\s*input.*\s*class\s*=\s*[\'"].*\s*js-play8-playlist\s*.*[\'"]\s*.*>)',
webpage, 'jwplayer playlist')
jwplayer_playlist = self._parse_json(self._search_regex(
r'.*\s+value\s*=\s*[\'"](.+)[\'"][\s/]',
input_element_with_playlist, 'playlist data'), video_id)
jwplayer_playlist = self._parse_json(extract_attributes(
input_element_with_playlist)['value'], video_id)
info = self._parse_jwplayer_data(
{'playlist': jwplayer_playlist}, video_id, base_url=url)

Expand Down

0 comments on commit e910f49

Please sign in to comment.