youtube-dl

Another place where youtube-dl lives on
git clone git://git.oshgnacknak.de/youtube-dl.git
Log | Files | Refs | README | LICENSE

commit 4c24ed94640b148882f1ceb400127b3b3afcafd4
parent 11208ebbf164dd6335581ccbdab30a7bb4af63d6
Author: Sergey M․ <dstftw@gmail.com>
Date:   Wed, 23 Dec 2015 01:10:31 +0600

[comcarcoff] Improve json data regex and modernize

Diffstat:
Myoutube_dl/extractor/comcarcoff.py | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/youtube_dl/extractor/comcarcoff.py b/youtube_dl/extractor/comcarcoff.py @@ -31,9 +31,10 @@ class ComCarCoffIE(InfoExtractor): display_id = 'comediansincarsgettingcoffee.com' webpage = self._download_webpage(url, display_id) - full_data = json.loads(self._search_regex( - r'\nwindow.app = (?P<json>.+?);\n', - webpage, 'full data json'))['videoData'] + full_data = self._parse_json( + self._search_regex( + r'window\.app\s*=\s*({.+?});\n', webpage, 'full data json'), + display_id)['videoData'] video_id = full_data['activeVideo']['video'] video_data = full_data.get('videos', {}).get(video_id) or full_data['singleshots'][video_id]