From: TheRealDude2 Date: Sun, 6 Sep 2020 04:10:27 +0000 (+0200) Subject: [xhamster] Improve initials regex (#26526) (closes #26353) X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=62ae19ff760b9df6a2600430e42e2c32f1449e7a;p=youtube-dl [xhamster] Improve initials regex (#26526) (closes #26353) --- 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*', + r'window\.initials\s*=\s*({.+?})\s*;'), webpage, 'initials', default='{}'), video_id, fatal=False) if initials: