aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-05-16 21:07:29 +0600
committerSergey M․ <dstftw@gmail.com>2015-05-16 21:07:29 +0600
commitef2dcbe4adce4478d409397faaae7ec6453ecf7d (patch)
tree49941099f05315caed13a66204cdbcd5f914a0c7
parent9354a5fad4521687eb9f08c1a42848621857400b (diff)
downloadyoutube-dl-ef2dcbe4adce4478d409397faaae7ec6453ecf7d.tar.xz
[sbs] Fix extraction (Closes #5725)
-rw-r--r--youtube_dl/extractor/sbs.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/youtube_dl/extractor/sbs.py b/youtube_dl/extractor/sbs.py
index b8775c2f9..3073e5e86 100644
--- a/youtube_dl/extractor/sbs.py
+++ b/youtube_dl/extractor/sbs.py
@@ -33,16 +33,18 @@ class SBSIE(InfoExtractor):
}]
def _real_extract(self, url):
- mobj = re.match(self._VALID_URL, url)
- video_id = mobj.group('id')
+ video_id = self._match_id(url)
+
webpage = self._download_webpage(url, video_id)
- release_urls_json = js_to_json(self._search_regex(
+ player = self._search_regex(
r'(?s)playerParams\.releaseUrls\s*=\s*(\{.*?\n\});\n',
- webpage, ''))
- release_urls = json.loads(release_urls_json)
- theplatform_url = (
- release_urls.get('progressive') or release_urls.get('standard'))
+ webpage, 'player')
+ player = re.sub(r"'\s*\+\s*[\da-zA-Z_]+\s*\+\s*'", '', player)
+
+ release_urls = self._parse_json(js_to_json(player), video_id)
+
+ theplatform_url = release_urls.get('progressive') or release_urls['standard']
title = remove_end(self._og_search_title(webpage), ' (The Feed)')
description = self._html_search_meta('description', webpage)
@@ -52,7 +54,6 @@ class SBSIE(InfoExtractor):
'_type': 'url_transparent',
'id': video_id,
'url': theplatform_url,
-
'title': title,
'description': description,
'thumbnail': thumbnail,