From 245e242a4f755ab467739293191501108ec99406 Mon Sep 17 00:00:00 2001 From: TheRealDude2 Date: Thu, 27 Aug 2020 11:09:30 +0200 Subject: [PATCH] [xhamster] - testing initials error --- youtube_dl/extractor/xhamster.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/xhamster.py b/youtube_dl/extractor/xhamster.py index 76cac1d75..30f1fdad9 100644 --- a/youtube_dl/extractor/xhamster.py +++ b/youtube_dl/extractor/xhamster.py @@ -127,9 +127,12 @@ class XHamsterIE(InfoExtractor): return int_or_none(self._search_regex( r'^(\d+)[pP]', s, 'height', default=None)) + initials = self._parse_json( self._search_regex( - r'window\.initials\s*=\s*({.+?})\s*;\s*', webpage, 'initials', + r'window\.initials\s*=\s*({.+?})\s*;<', webpage, 'initials', + #r'window\.initials\s*=\s*({.+?})\s*;', webpage, 'initials', + #r'\\s*=\s*({.+?})\s*;\<\/sript\>', webpage, 'initials', default='{}'), video_id, fatal=False) if initials: