aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2017-02-02 23:03:38 +0700
committerSergey M․ <dstftw@gmail.com>2017-02-02 23:04:46 +0700
commitc54c01f82dba6d3e982c73c81ad71c49f31d8af1 (patch)
tree4ef6ae86860beaf4454f2a9410ff3fda8cae9919 /youtube_dl
parent5a116e13020813f9f1d952504455043986c28b9b (diff)
[go] Relax video id regex (closes #11937)
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/go.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/youtube_dl/extractor/go.py b/youtube_dl/extractor/go.py
index c7776b186..a34779b16 100644
--- a/youtube_dl/extractor/go.py
+++ b/youtube_dl/extractor/go.py
@@ -43,7 +43,10 @@ class GoIE(InfoExtractor):
sub_domain, video_id, display_id = re.match(self._VALID_URL, url).groups()
if not video_id:
webpage = self._download_webpage(url, display_id)
- video_id = self._search_regex(r'data-video-id=["\']VDKA(\w+)', webpage, 'video id')
+ video_id = self._search_regex(
+ # There may be inner quotes, e.g. data-video-id="'VDKA3609139'"
+ # from http://freeform.go.com/shows/shadowhunters/episodes/season-2/1-this-guilty-blood
+ r'data-video-id=["\']*VDKA(\w+)', webpage, 'video id')
brand = self._BRANDS[sub_domain]
video_data = self._download_json(
'http://api.contents.watchabc.go.com/vp2/ws/contents/3000/videos/%s/001/-1/-1/-1/%s/-1/-1.json' % (brand, video_id),