diff options
author | Yen Chi Hsuan <yan12125@gmail.com> | 2017-03-26 21:51:09 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-26 21:51:09 +0800 |
commit | cc63259d18fcb2940402d35139c40077481e5a22 (patch) | |
tree | 773585377b689a156a5e95292f08cd68712c3d7e /youtube_dl/extractor/generic.py | |
parent | 2bfaf89b6cc6dd07ed6ca32086c72a98b67c20ba (diff) | |
parent | 4f06c1c9fcbfbc74b81b5fa89a616914b5ce5aad (diff) |
Merge pull request #12307 from rndusr/fix/str-item-assignment
Fix "'str' object does not support item assignment"
Diffstat (limited to 'youtube_dl/extractor/generic.py')
-rw-r--r-- | youtube_dl/extractor/generic.py | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py index 4fff93efe..274f81738 100644 --- a/youtube_dl/extractor/generic.py +++ b/youtube_dl/extractor/generic.py @@ -991,6 +991,20 @@ class GenericIE(InfoExtractor): 'thumbnail': r're:^https?://.*\.jpg$', }, }, + { + # JWPlayer config passed as variable + 'url': 'http://www.txxx.com/videos/3326530/ariele/', + 'info_dict': { + 'id': '3326530_hq', + 'ext': 'mp4', + 'title': 'ARIELE | Tube Cup', + 'uploader': 'www.txxx.com', + 'age_limit': 18, + }, + 'params': { + 'skip_download': True, + } + }, # rtl.nl embed { 'url': 'http://www.rtlnieuws.nl/nieuws/buitenland/aanslagen-kopenhagen', @@ -2550,18 +2564,14 @@ class GenericIE(InfoExtractor): self._sort_formats(entry['formats']) return self.playlist_result(entries) - jwplayer_data_str = self._find_jwplayer_data(webpage) - if jwplayer_data_str: - try: - jwplayer_data = self._parse_json( - jwplayer_data_str, video_id, transform_source=js_to_json) - info = self._parse_jwplayer_data( - jwplayer_data, video_id, require_title=False) - if not info.get('title'): - info['title'] = video_title - return info - except ExtractorError: - pass + jwplayer_data = self._find_jwplayer_data( + webpage, video_id, transform_source=js_to_json) + if jwplayer_data: + info = self._parse_jwplayer_data( + jwplayer_data, video_id, require_title=False) + if not info.get('title'): + info['title'] = video_title + return info def check_video(vurl): if YoutubeIE.suitable(vurl): |