diff options
| author | Yen Chi Hsuan <yan12125@gmail.com> | 2015-05-04 19:09:18 +0800 | 
|---|---|---|
| committer | Yen Chi Hsuan <yan12125@gmail.com> | 2015-05-04 19:09:18 +0800 | 
| commit | b9b3ab45ea95e4c48f3c87d3584f8180ff460be6 (patch) | |
| tree | 494d55f9f1f8224742b38f0cc09c84584ee50bb7 | |
| parent | 957b794c2622fdc3696c245f1fa1eebfdb0f8bdf (diff) | |
[NBC] Enhance extraction of ThePlatform URL (fixes #5470)
| -rw-r--r-- | youtube_dl/extractor/nbc.py | 15 | 
1 files changed, 14 insertions, 1 deletions
| diff --git a/youtube_dl/extractor/nbc.py b/youtube_dl/extractor/nbc.py index ecd0ac8b1..6cbe03d0f 100644 --- a/youtube_dl/extractor/nbc.py +++ b/youtube_dl/extractor/nbc.py @@ -37,13 +37,26 @@ class NBCIE(InfoExtractor):              },              'skip': 'Only works from US',          }, +        { +            'url': 'http://www.nbc.com/saturday-night-live/video/star-wars-teaser/2832821', +            'info_dict': { +                'id': '8iUuyzWDdYUZ', +                'ext': 'flv', +                'title': 'Star Wars Teaser', +                'description': 'md5:0b40f9cbde5b671a7ff62fceccc4f442', +            }, +            'skip': 'Only works from US', +        }      ]      def _real_extract(self, url):          video_id = self._match_id(url)          webpage = self._download_webpage(url, video_id)          theplatform_url = self._search_regex( -            '(?:class="video-player video-player-full" data-mpx-url|class="player" src)="(.*?)"', +            [ +                r'(?:class="video-player video-player-full" data-mpx-url|class="player" src)="(.*?)"', +                r'"embedURL"\s*:\s*"([^"]+)"' +            ],              webpage, 'theplatform url').replace('_no_endcard', '')          if theplatform_url.startswith('//'):              theplatform_url = 'http:' + theplatform_url | 
