projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5ed05f2
)
[xhamster] Improve initials regex (#26526) (closes #26353)
author
TheRealDude2
<the.real.dude@gmx.de>
Sun, 6 Sep 2020 04:10:27 +0000
(06:10 +0200)
committer
GitHub
<noreply@github.com>
Sun, 6 Sep 2020 04:10:27 +0000
(11:10 +0700)
youtube_dl/extractor/xhamster.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/xhamster.py
b/youtube_dl/extractor/xhamster.py
index 902a3ed338e914c9e20edc3c643d0e5274d71fe7..76aeaf9a46a6f67a054bfbc3313b8e6d4309a7f2 100644
(file)
--- 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: