lay295 / TwitchDownloader

Twitch VOD/Clip Downloader - Chat Download/Render/Replay
MIT License
2.78k stars 261 forks source link

Response status code does not indicate success: 401 (Unauthorized). #1227

Open Kartoshka2331 opened 1 month ago

Kartoshka2331 commented 1 month ago

Checklist

Edition

Command Line Interface

Describe your issue here

When I try to download a video, I get the error “Unhandled exception. System.AggregateException: One or more errors occurred. (The response status code does not indicate success: 401 (Unauthorized).)”.

C:\Users\WDAGUtilityAccount\Desktop>TwitchDownloaderCLI videodownload --oauth MY_SECRET_TOKEN --id 2274913337 --ffmpeg-path ffmpeg.exe --quality 1080p60 --output test.mp4
TwitchDownloaderCLI 1.55.0 Copyright (c) lay295 and contributors
[STATUS] - Получение информации о видео [1/4]
Не обработанное исключение. System.AggregateException: Произошла одна или несколько ошибок. (Код состояния ответа не указывает на успех: 401 (Неавторизованный)).
 ---> System.Net.Http.HttpRequestException: Код состояния ответа не указывает на успех: 401 (Unauthorized).
   at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
   at TwitchDownloaderCore.TwitchHelper.GetVideoToken(Int64 videoId, String authToken) in /home/runner/work/TwitchDownloader/TwitchDownloader/TwitchDownloaderCore/TwitchHelper.cs:line 57
   at TwitchDownloaderCore.VideoDownloader.GetQualityPlaylist() in /home/runner/work/TwitchDownloader/TwitchDownloader/TwitchDownloaderCore/VideoDownloader.cs:line 494
   at TwitchDownloaderCore.VideoDownloader.DownloadAsyncImpl(FileInfo outputFileInfo, FileStream outputFs, CancellationToken cancellationToken) in /home/runner/work/TwitchDownloader/TwitchDownloader/TwitchDownloaderCore/VideoDownloader.cs:line 81
   at TwitchDownloaderCore.VideoDownloader.DownloadAsyncImpl(FileInfo outputFileInfo, FileStream outputFs, CancellationToken cancellationToken) in /home/runner/work/TwitchDownloader/TwitchDownloaderCore/VideoDownloader.cs:line 146
   at TwitchDownloaderCore.VideoDownloader.DownloadAsync(CancellationToken cancellationToken) in /home/runner/work/TwitchDownloader/TwitchDownloader/TwitchDownloaderCore/VideoDownloader.cs:line 49
   at TwitchDownloaderCore.VideoDownloader.DownloadAsync(CancellationToken cancellationToken) in /home/runner/work/TwitchDownloader/TwitchDownloader/TwitchDownloaderCore/VideoDownloader.cs:line 57
   at TwitchDownloaderCore.VideoDownloader.DownloadAsync(CancellationToken cancellationToken) in /home/runner/work/TwitchDownloader/TwitchDownloader/TwitchDownloaderCore/VideoDownloader.cs:line 58
   --- Конец трассировки стека внутренних исключений ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean )
   at System.Threading.Tasks.Task.Wait(Int32 , CancellationToken )
   at System.Threading.Tasks.Task.Wait()
   at TwitchDownloaderCLI.Modes.DownloadVideo.Download(VideoDownloadArgs inputOptions) in /home/runner/work/TwitchDownloader/TwitchDownloader/TwitchDownloaderCLI/Modes/DownloadVideo.cs:line 26
   at CommandLine.ParserResultExtensions.WithParsed[T](ParserResult`1 result, Action`1 action)
   at TwitchDownloaderCLI.Program.Main(String[] args) in /home/runner/work/TwitchDownloader/TwitchDownloader/TwitchDownloaderCLI/Program.cs:line 34

Maybe I'm doing something wrong?

Add any related files or extra information here

I tried to download 2274913337, just random video.

ScrubN commented 1 month ago

Strange, you shouldn't even need to provide your oauth for a public video