mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-14 15:22:35 +00:00
[TwitCasting] Check for password protection (#2838)
Authored by: Lesmiscore
This commit is contained in:
parent
3f4faff748
commit
f099df1463
1 changed files with 3 additions and 0 deletions
|
@ -94,6 +94,9 @@ class TwitCastingIE(InfoExtractor):
|
||||||
urlh.geturl(), video_id, data=request_data,
|
urlh.geturl(), video_id, data=request_data,
|
||||||
headers={'Origin': 'https://twitcasting.tv'},
|
headers={'Origin': 'https://twitcasting.tv'},
|
||||||
note='Retrying authentication')
|
note='Retrying authentication')
|
||||||
|
# has to check here as the first request can contain password input form even if the password is correct
|
||||||
|
if re.search(r'<form\s+method="POST">\s*<input\s+[^>]+?name="password"', webpage):
|
||||||
|
raise ExtractorError('This video is protected by a password, use the --video-password option', expected=True)
|
||||||
|
|
||||||
title = (clean_html(get_element_by_id('movietitle', webpage))
|
title = (clean_html(get_element_by_id('movietitle', webpage))
|
||||||
or self._html_search_meta(['og:title', 'twitter:title'], webpage, fatal=True))
|
or self._html_search_meta(['og:title', 'twitter:title'], webpage, fatal=True))
|
||||||
|
|
Loading…
Reference in a new issue