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

pull/8/head
TheRealDude2 4 years ago committed by GitHub
parent 5ed05f26ad
commit 62ae19ff76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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:

Loading…
Cancel
Save