logo

youtube-dl

[mirror] Download/Watch videos from video hosters
commit: 62ae19ff760b9df6a2600430e42e2c32f1449e7a
parent 5ed05f26adea517aa715d5ec4b0dccfea30b2b8e
Author: TheRealDude2 <the.real.dude@gmx.de>
Date:   Sun,  6 Sep 2020 06:10:27 +0200

[xhamster] Improve initials regex (#26526) (closes #26353)


Diffstat:

Myoutube_dl/extractor/xhamster.py3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 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: