aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukáš Lalinský <lukas@oxygene.sk>2015-11-22 13:53:26 +0100
committerLukáš Lalinský <lukas@oxygene.sk>2015-11-22 13:53:26 +0100
commitb41631c4e6e56afb2427513c84df1b13681cf4c8 (patch)
tree8a5cb4bd462aa7cad5c5b8a983436409b056b1b9
parent0e49d9a6b0216555c2a3ee063ae3d1c6d09edbd4 (diff)
[youtube] Send the list of patterns directly to _search_regex
-rw-r--r--youtube_dl/extractor/youtube.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py
index 7e74d2368..247769067 100644
--- a/youtube_dl/extractor/youtube.py
+++ b/youtube_dl/extractor/youtube.py
@@ -879,10 +879,9 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
r';ytplayer\.config\s*=\s*({.*?});ytplayer',
r';ytplayer\.config\s*=\s*({.*?});',
]
- for pattern in patterns:
- config = self._search_regex(pattern, webpage, 'ytconfig.player', default=None)
- if config is not None:
- return json.loads(uppercase_escape(config))
+ config = self._search_regex(patterns, webpage, 'ytconfig.player', default=None)
+ if config is not None:
+ return json.loads(uppercase_escape(config))
def _get_automatic_captions(self, video_id, webpage):
"""We need the webpage for getting the captions url, pass it as an