Skip to content

A feature-rich command-line audio/video downloader

[bbc] Improve data-playable regex

Sergey M․b1ec70e4a9fc
diff --git a/youtube_dl/extractor/bbc.py b/youtube_dl/extractor/bbc.py
index 0a08a57bd2..972abd0d4b 100644
--- a/youtube_dl/extractor/bbc.py
+++ b/youtube_dl/extractor/bbc.py
@@ -739,7 +739,8 @@ class BBCIE(BBCCoUkIE):
# http://www.bbc.com/news/world-us-canada-34473351)
data_playable = self._parse_json(
unescapeHTML(self._search_regex(
- r'data-playable="({.+?})"', webpage, 'data playable', default='{}')),
+ r'data-playable=(["\'])(?P<json>{.+?})\1', webpage,
+ 'data playable', default='{}', group='json')),
programme_id, fatal=False)
if data_playable:
# data-playable has video vpid in settings.playlistObject.items (e.g.