1
0
Fork 0
mirror of https://codeberg.org/polarisfm/youtube-dl.git synced 2024-12-25 09:11:34 +00:00

[youporn] Fix JSON parameter regexp (Fixes #4384)

This commit is contained in:
Philipp Hagemeister 2014-12-06 00:48:29 +01:00
parent 1a7c6c69d3
commit 58daf5ebed

View file

@ -45,7 +45,9 @@ class YouPornIE(InfoExtractor):
age_limit = self._rta_search(webpage)
# Get JSON parameters
json_params = self._search_regex(r'var currentVideo = new Video\((.*)\);', webpage, 'JSON parameters')
json_params = self._search_regex(
r'var currentVideo = new Video\((.*)\)[,;]',
webpage, 'JSON parameters')
try:
params = json.loads(json_params)
except: