[bbc] Improve data-playable regex
authorSergey M․ <dstftw@gmail.com>
Sat, 10 Oct 2015 17:20:30 +0000 (23:20 +0600)
committerSergey M․ <dstftw@gmail.com>
Sat, 10 Oct 2015 17:20:30 +0000 (23:20 +0600)
youtube_dl/extractor/bbc.py

index 0a08a57bd2c58cbcb1c3cda78113dbbca1b97380..972abd0d4b1e2ee3823d2649542d33aa78b86b12 100644 (file)
@@ -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.