Skip to content

Commit

Permalink
[youporn] Fix JSON parameter regexp (Fixes #4384)
Browse files Browse the repository at this point in the history
  • Loading branch information
phihag committed Dec 5, 2014
1 parent 1a7c6c6 commit 58daf5e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion youtube_dl/extractor/youporn.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ def _real_extract(self, url):
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:
Expand Down

0 comments on commit 58daf5e

Please sign in to comment.