summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheRealDude2 <the.real.dude@gmx.de>2020-09-06 06:10:27 +0200
committerGitHub <noreply@github.com>2020-09-06 11:10:27 +0700
commit62ae19ff760b9df6a2600430e42e2c32f1449e7a (patch)
tree2ed1c693d2d51e24db3945b95fb4a5155a56b52d
parent5ed05f26adea517aa715d5ec4b0dccfea30b2b8e (diff)
[xhamster] Improve initials regex (#26526) (closes #26353)
-rw-r--r--youtube_dl/extractor/xhamster.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube_dl/extractor/xhamster.py b/youtube_dl/extractor/xhamster.py
index 902a3ed33..76aeaf9a4 100644
--- a/youtube_dl/extractor/xhamster.py
+++ b/youtube_dl/extractor/xhamster.py
@@ -138,7 +138,8 @@ class XHamsterIE(InfoExtractor):
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: