Flow-Launcher / Flow.Launcher

:mag: Quick file search & app launcher for Windows with community-made plugins
https://flowlauncher.com
MIT License
7.66k stars 301 forks source link

BUG: Youtube Downloader plugin giving error when I try downloading a video #2852

Closed Shwibi closed 1 month ago

Shwibi commented 1 month ago

Checks

Problem Description

Whenever I try downloading a video using the Youtube Downloader plugin, it gives me the following error message: Flow Launcher version: 1.16.1 OS Version: 22631.3880 IntPtr Length: 8 x64: True

Python Path: C:\Users\user\AppData\Local\Programs\Python\Python311\pythonw.exe Node Path: Date: 07/21/2024 20:25:46 Exception: System.IO.InvalidDataException: Traceback (most recent call last): File "C:\Users\user\AppData\Roaming\FlowLauncher\Plugins\Youtube Downloader-1.0.1\main.py", line 94, in YoutubeDownload() File "C:\Users\user\AppData\Roaming\FlowLauncher\Plugins\Youtube Downloader-1.0.1\lib\flowlauncher\FlowLauncher.py", line 33, in init results = request_method(request_parameters) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\user\AppData\Roaming\FlowLauncher\Plugins\Youtube Downloader-1.0.1\main.py", line 88, in download_video video = youtube.streams.get_highest_resolution() ^^^^^^^^^^^^^^^ File "C:\Users\user\AppData\Roaming\FlowLauncher\Plugins\Youtube Downloader-1.0.1\lib\pytube__main.py", line 296, in streams return StreamQuery(self.fmt_streams) ^^^^^^^^^^^^^^^^ File "C:\Users\user\AppData\Roaming\FlowLauncher\Plugins\Youtube Downloader-1.0.1\lib\pytube__main.py", line 176, in fmt_streams stream_manifest = extract.apply_descrambler(self.streaming_data) ^^^^^^^^^^^^^^^^^^^ File "C:\Users\user\AppData\Roaming\FlowLauncher\Plugins\Youtube Downloader-1.0.1\lib\pytube\main__.py", line 160, in streaming_data self.bypass_age_gate() File "C:\Users\user\AppData\Roaming\FlowLauncher\Plugins\Youtube Downloader-1.0.1\lib\pytube\main__.py", line 257, in bypass_age_gate innertube_response = innertube.player(self.video_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\user\AppData\Roaming\FlowLauncher\Plugins\Youtube Downloader-1.0.1\lib\pytube\innertube.py", line 448, in player return self._call_api(endpoint, query, self.base_data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\user\AppData\Roaming\FlowLauncher\Plugins\Youtube Downloader-1.0.1\lib\pytube\innertube.py", line 390, in _call_api response = request._execute_request( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\user\AppData\Roaming\FlowLauncher\Plugins\Youtube Downloader-1.0.1\lib\pytube\request.py", line 37, in _execute_request return urlopen(request, timeout=timeout) # nosec ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 216, in urlopen return opener.open(url, data, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 525, in open response = meth(req, response) ^^^^^^^^^^^^^^^^^^^ File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 634, in http_response response = self.parent.error( ^^^^^^^^^^^^^^^^^^ File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 563, in error return self._call_chain(args) ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 496, in _call_chain result = func(*args) ^^^^^^^^^^^ File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 643, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 400: Bad Request

at Flow.Launcher.Core.Plugin.JsonRPCPlugin.ExecuteAsync(ProcessStartInfo startInfo, CancellationToken token) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\JsonRPCPlugin.cs:line 291 at Flow.Launcher.Core.Plugin.JsonRPCPlugin.ExecuteAsync(ProcessStartInfo startInfo, CancellationToken token) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\JsonRPCPlugin.cs:line 296 at Flow.Launcher.Core.Plugin.JsonRPCPlugin.<>c__DisplayClass19_0.<b0>d.MoveNext() in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\JsonRPCPlugin.cs:line 136 --- End of stack trace from previous location --- at Flow.Launcher.ViewModel.MainViewModel.OpenResultAsync(String index) in C:\projects\flow-launcher\Flow.Launcher\ViewModel\MainViewModel.cs:line 286 at CommunityToolkit.Mvvm.Input.AsyncRelayCommand.AwaitAndThrowIfFailed(Task executionTask) at System.Threading.Tasks.Task.<>c.b128_0(Object state) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

To Reproduce

  1. Copy a public youtube video URL
  2. Open Flow launcher and use the youtube downloader plugin prefix (-yt <url)
  3. Select "Download in Full Resolution"

Screenshots

No response

Flow Launcher Version

1.16.1

Windows Build Number

22631.3880

Error Log

2024-07-21.txt

deefrawley commented 1 month ago

Hi. Can you please update Flow Launcher to the latest version and if the problem still persists, please relog this issue in the plugins repo. Thanks

https://github.com/DeepVoyager253/FlowLauncherYTDownload