Repository: yt-dlp/yt-dlp

Issue:
[TwitCasting] Does not detect password-protected archive/lives
### Checklist

- [X] I'm reporting a broken site
- [X] I've verified that I'm running yt-dlp version **2022.02.04**. ([update instructions](https://github.com/yt-dlp/yt-dlp#update))
- [X] I've checked that all provided URLs are alive and playable in a browser
- [X] I've checked that all URLs and arguments with special characters are [properly quoted or escaped](https://github.com/ytdl-org/youtube-dl#video-url-contains-an-ampersand-and-im-getting-some-strange-output-1-2839-or-v-is-not-recognized-as-an-internal-or-external-command)
- [X] I've searched the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues including closed ones. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)
- [ ] I've read about [sharing account credentials](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#are-you-willing-to-share-account-details-if-needed) and I'm willing to share it if required

### Region

[TwitCastingLive] "Failed to get m3u8 playlist" on /show endpoint

### Description

When looking for a streamer for a test case for #2835, I have noticed that is a streamer has no public recorded videos under /show (in this case there were only deleted videos and one private recorded video) then the extractor errors out.

### Verbose log

```shell
$ yt-dlp -vU -j https://twitcasting.tv/ais2yu_/show/
[debug] Command-line config: ['-vU', '-j', 'https://twitcasting.tv/ais2yu_/show/']
[debug] User config "/home/nurupo/.config/yt-dlp/config": ['--cookies', '/home/nurupo/.config/yt-dlp/cookies.txt', '--rm-cache-dir']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, err utf-8, pref UTF-8
[debug] yt-dlp version 2022.02.04 [c1653e9ef]
[debug] Python version 3.9.2 (CPython 64bit) - Linux-5.10.0-11-amd64-x86_64-with-glibc2.31
[debug] exe versions: ffmpeg 4.3.3-0, ffprobe 4.3.3-0
[debug] Optional libraries: Cryptodome, mutagen, sqlite, websockets
[debug] Proxy map: {}
Removing cache dir /home/nurupo/.cache/yt-dlp ..
Latest version: 2022.02.04, Current version: 2022.02.04
yt-dlp is up to date (2022.02.04)
[debug] [TwitCastingUser] Extracting URL: https://twitcasting.tv/ais2yu_/show/
[download] Downloading playlist: ais2yu_ - Live History
[TwitCastingUser] ais2yu_: Downloading page 1
[TwitCastingUser] playlist ais2yu_ - Live History: Downloading 1 videos
[download] Downloading video 1 of 1
[debug] [TwitCasting] Extracting URL: https://twitcasting.tv/ais2yu_/movie/720503537
[TwitCasting] 720503537: Downloading webpage
[TwitCasting] 720503537: Downloading live info
ERROR: [TwitCasting] 720503537: Failed to get m3u8 playlist; please report this issue on  https://github.com/yt-dlp/yt-dlp , filling out the "Broken site" issue template properly. Confirm you are on the latest version using -U; please report this issue on  https://github.com/yt-dlp/yt-dlp , filling out the "Broken site" issue template properly. Confirm you are on the latest version using -U
  File ".pyenv/lib/python3.9/site-packages/yt_dlp/extractor/common.py", line 612, in extract
    ie_result = self._real_extract(url)
  File ".pyenv/lib/python3.9/site-packages/yt_dlp/extractor/twitcasting.py", line 144, in _real_extract
    raise ExtractorError('Failed to get m3u8 playlist')

[download] Finished downloading playlist: ais2yu_ - Live History
```



Discussion:
It is normal that password-protected videos shows up on `/show`. (see https://twitcasting.tv/ais2yu_/show/0?filter=watchable)

Password-protected videos require `--video-password` (https://twitcasting.tv/ais2yu_/movie/720503537). Hence the error. Closing.
The error explicitly says to report this as a bug:

>ERROR: [TwitCasting] 720503537: Failed to get m3u8 playlist; please report this issue on  https://github.com/yt-dlp/yt-dlp , filling out the "Broken site" issue template properly. Confirm you are on the latest version using -U; please report this issue on  https://github.com/yt-dlp/yt-dlp , filling out the "Broken site" issue template properly. Confirm you are on the latest version using -U

If this is expected and users shouldn't report this, perhaps some other message should be printed instead?
You're right.
Maybe we should implement check for password-protected videos...

I'll re-open but close again after adding checks for it.

P.S. forgive me for renaming this issue

Resolving patch:
diff --git a/yt_dlp/extractor/twitcasting.py b/yt_dlp/extractor/twitcasting.py
--- a/yt_dlp/extractor/twitcasting.py
+++ b/yt_dlp/extractor/twitcasting.py
@@ -94,6 +94,9 @@ def _real_extract(self, url):
                 urlh.geturl(), video_id, data=request_data,
                 headers={'Origin': 'https://twitcasting.tv'},
                 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))
                  or self._html_search_meta(['og:title', 'twitter:title'], webpage, fatal=True))


Test patch: