aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-07-11 11:01:59 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2014-07-11 11:01:59 +0200
commit3dfd25b3aa608e175d5f16b6e0cc7fe82b8ad7ac (patch)
tree0e110461ac6edbe79860eb7dd6304eaf044a4caf
parent6f66eedc5dc84ac72b36722771ec625f4ccecef7 (diff)
[goshgay] PEP8 and test for age_limit (#3220)
-rw-r--r--youtube_dl/extractor/goshgay.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/youtube_dl/extractor/goshgay.py b/youtube_dl/extractor/goshgay.py
index 3f31ec896..7bca21ad0 100644
--- a/youtube_dl/extractor/goshgay.py
+++ b/youtube_dl/extractor/goshgay.py
@@ -22,6 +22,7 @@ class GoshgayIE(InfoExtractor):
'ext': 'flv',
'title': 'md5:089833a4790b5e103285a07337f245bf',
'thumbnail': 're:http://.*\.jpg',
+ 'age_limit': 18,
}
}
@@ -32,8 +33,8 @@ class GoshgayIE(InfoExtractor):
webpage = self._download_webpage(url, video_id)
title = self._search_regex(r'class="video-title"><h1>(.+?)<', webpage, 'title')
- player_config = self._search_regex(r'jwplayer\("player"\)\.setup\(({.+?})\)', webpage, 'config settings',
- fatal=True, flags=re.S)
+ player_config = self._search_regex(
+ r'(?s)jwplayer\("player"\)\.setup\(({.+?})\)', webpage, 'config settings')
player_vars = json.loads(player_config.replace("'", '"'))
width = str_to_int(player_vars.get('width'))
height = str_to_int(player_vars.get('height'))