Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[xhamster] Improve initials regex (#26526) (closes #26353)
  • Loading branch information
TheRealDude2 authored and GitHub committed Sep 6, 2020
1 parent 5ed05f2 commit 62ae19f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion youtube_dl/extractor/xhamster.py
Expand Up @@ -138,7 +138,8 @@ def get_height(s):

initials = self._parse_json(
self._search_regex(
r'window\.initials\s*=\s*({.+?})\s*;', webpage, 'initials',
(r'window\.initials\s*=\s*({.+?})\s*;\s*</script>',
r'window\.initials\s*=\s*({.+?})\s*;'), webpage, 'initials',
default='{}'),
video_id, fatal=False)
if initials:
Expand Down

0 comments on commit 62ae19f

Please sign in to comment.