Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG REPORT] Cannot download YouTube audio #229

Open
tomcat-bit opened this issue May 6, 2024 · 0 comments
Open

[BUG REPORT] Cannot download YouTube audio #229

tomcat-bit opened this issue May 6, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@tomcat-bit
Copy link

Describe the bug
When trying to download an audio file from a YouTube link an exception occurs.

To Reproduce
Steps to reproduce the behavior:

  1. Follow the installation guide described in this repository.
  2. Go to Utils -> audio downloads.
  3. Paste a YouTube link and press "Download".

Expected behavior
An audio file

Screenshots

Traceback (most recent call last):
  File "/home/thomas/Downloads/audio-webui/audio-webui/venv/lib64/python3.10/site-packages/pytube/__main__.py", line 181, in fmt_streams
    extract.apply_signature(stream_manifest, self.vid_info, self.js)
  File "/home/thomas/Downloads/audio-webui/audio-webui/venv/lib64/python3.10/site-packages/pytube/extract.py", line 409, in apply_signature
    cipher = Cipher(js=js)
  File "/home/thomas/Downloads/audio-webui/audio-webui/venv/lib64/python3.10/site-packages/pytube/cipher.py", line 33, in __init__
    raise RegexMatchError(
pytube.exceptions.RegexMatchError: __init__: could not find match for ^\w+\W

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/thomas/Downloads/audio-webui/audio-webui/venv/lib64/python3.10/site-packages/gradio/queueing.py", line 407, in call_prediction
    output = await route_utils.call_process_api(
  File "/home/thomas/Downloads/audio-webui/audio-webui/venv/lib64/python3.10/site-packages/gradio/route_utils.py", line 226, in call_process_api
    output = await app.get_blocks().process_api(
  File "/home/thomas/Downloads/audio-webui/audio-webui/venv/lib64/python3.10/site-packages/gradio/blocks.py", line 1550, in process_api
    result = await self.call_function(
  File "/home/thomas/Downloads/audio-webui/audio-webui/venv/lib64/python3.10/site-packages/gradio/blocks.py", line 1185, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "/home/thomas/Downloads/audio-webui/audio-webui/venv/lib64/python3.10/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
  File "/home/thomas/Downloads/audio-webui/audio-webui/venv/lib64/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2144, in run_sync_in_worker_thread
    return await future
  File "/home/thomas/Downloads/audio-webui/audio-webui/venv/lib64/python3.10/site-packages/anyio/_backends/_asyncio.py", line 851, in run
    result = context.run(func, *args)
  File "/home/thomas/Downloads/audio-webui/audio-webui/venv/lib64/python3.10/site-packages/gradio/utils.py", line 661, in wrapper
    response = f(*args, **kwargs)
  File "/home/thomas/Downloads/audio-webui/audio-webui/webui/modules/implementations/audio_download.py", line 8, in download_audio
    video = yt.streams.filter(only_audio=True).first()
  File "/home/thomas/Downloads/audio-webui/audio-webui/venv/lib64/python3.10/site-packages/pytube/__main__.py", line 296, in streams
    return StreamQuery(self.fmt_streams)
  File "/home/thomas/Downloads/audio-webui/audio-webui/venv/lib64/python3.10/site-packages/pytube/__main__.py", line 188, in fmt_streams
    extract.apply_signature(stream_manifest, self.vid_info, self.js)
  File "/home/thomas/Downloads/audio-webui/audio-webui/venv/lib64/python3.10/site-packages/pytube/extract.py", line 409, in apply_signature
    cipher = Cipher(js=js)
  File "/home/thomas/Downloads/audio-webui/audio-webui/venv/lib64/python3.10/site-packages/pytube/cipher.py", line 33, in __init__
    raise RegexMatchError(
pytube.exceptions.RegexMatchError: __init__: could not find match for ^\w+\W

Additional context
OS: Fedora 40
Kernel: x86_64 Linux 6.8.8-300.fc40.x86_64
CPU: Intel Core i7-5960X @ 16x 3.5GHz [39.0°C]
GPU: NVIDIA GeForce RTX 3090
RAM: 22721MiB / 31980MiB

@tomcat-bit tomcat-bit added the bug Something isn't working label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants