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

Why Generic Loader fails to load YouTube Audoio #10193

Closed
8 of 9 tasks
hsabaghpour opened this issue Jun 16, 2024 · 3 comments
Closed
8 of 9 tasks

Why Generic Loader fails to load YouTube Audoio #10193

hsabaghpour opened this issue Jun 16, 2024 · 3 comments
Labels
question Question

Comments

@hsabaghpour
Copy link

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

  • I understand that I will be blocked if I intentionally remove or skip any mandatory* field

Checklist

Please make sure the question is worded well enough to be understood

lready satisfied: idna<4,>=2.5 in /opt/anaconda3/envs/my_conda_venv/lib/python3.12/site-packages (from requests<3,>=2.31.0->yt-dlp) (3.7)
[youtube] Extracting URL: https://www.youtube.com/watch?v=qWdyhFiyH0Y
[youtube] qWdyhFiyH0Y: Downloading webpage
WARNING: [youtube] unable to extract initial player response; please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U
[youtube] qWdyhFiyH0Y: Downloading ios player API JSON
WARNING: [youtube] qWdyhFiyH0Y: Failed to parse JSON (caused by JSONDecodeError("Expecting value in '': line 1 column 1 (char 0)")); please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U
[youtube] qWdyhFiyH0Y: Downloading iframe API JS
WARNING: [youtube] unable to extract player version; please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U
[youtube] qWdyhFiyH0Y: Downloading web player API JSON
WARNING: [youtube] qWdyhFiyH0Y: Failed to parse JSON (caused by JSONDecodeError("Expecting value in '': line 1 column 1 (char 0)")); please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U
ERROR: [youtube] qWdyhFiyH0Y: Failed to extract any player response; please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U
ExtractorError Traceback (most recent call last)
File /opt/anaconda3/envs/my_conda_venv/lib/python3.12/site-packages/yt_dlp/YoutubeDL.py:1606, in YoutubeDL._handle_extraction_exceptions..wrapper(self, *args, **kwargs)
1605 try:
-> 1606 return func(self, *args, **kwargs)
1607 except (DownloadCancelled, LazyList.IndexError, PagedList.IndexError):

File /opt/anaconda3/envs/my_conda_venv/lib/python3.12/site-packages/yt_dlp/YoutubeDL.py:1741, in YoutubeDL.__extract_info(self, url, ie, download, extra_info, process)
1740 try:
-> 1741 ie_result = ie.extract(url)
1742 except UserNotLive as e:

File /opt/anaconda3/envs/my_conda_venv/lib/python3.12/site-packages/yt_dlp/extractor/common.py:734, in InfoExtractor.extract(self, url)
732 self.to_screen('Extracting URL: %s' % (
733 url if self.get_param('verbose') else truncate_string(url, 100, 20)))
--> 734 ie_result = self._real_extract(url)
735 if ie_result is None:

File /opt/anaconda3/envs/my_conda_venv/lib/python3.12/site-packages/yt_dlp/extractor/youtube.py:4145, in YoutubeIE._real_extract(self, url)
4143 webpage_url = base_url + 'watch?v=' + video_id
-> 4145 webpage, master_ytcfg, player_responses, player_url = self._download_player_responses(url, smuggled_data, video_id, webpage_url)
4147 playability_statuses = traverse_obj(
4148 player_responses, (..., 'playabilityStatus'), expected_type=dict)

File /opt/anaconda3/envs/my_conda_venv/lib/python3.12/site-packages/yt_dlp/extractor/youtube.py:4109, in YoutubeIE._download_player_responses(self, url, smuggled_data, video_id, webpage_url)
...
1011 exc_info = sys.exc_info()
-> 1012 raise DownloadError(message, exc_info)
1013 self._download_retcode = 1

Provide verbose output that clearly demonstrates the problem

  • Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
  • If using API, add 'verbose': True to YoutubeDL params instead
  • Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

[debug] Command-line config: ['-vU']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version [email protected] from yt-dlp/yt-dlp-nightly-builds [4093eb1fc] (pip)
[debug] Python 3.12.3 (CPython arm64 64bit) - macOS-14.5-arm64-arm-64bit (OpenSSL 3.0.13 30 Jan 2024)
[debug] exe versions: none
[debug] Optional libraries: Cryptodome-3.20.0, brotli-1.1.0, certifi-2024.06.02, mutagen-1.47.0, requests-2.32.3, sqlite3-3.45.3, urllib3-2.2.1, websockets-12.0
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets
[debug] Loaded 1821 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-nightly-builds/releases/latest
Latest version: [email protected] from yt-dlp/yt-dlp-nightly-builds
yt-dlp is up to date ([email protected] from yt-dlp/yt-dlp-nightly-builds)
[youtube] Extracting URL : https://www.youtube.com/watch?v=qWdyhFiyH0Y
@hsabaghpour hsabaghpour added the question Question label Jun 16, 2024
@bashonly
Copy link
Member

bashonly commented Jun 16, 2024

Looks like a networking issue, maybe firewall-related?

Can you watch the same Youtube video in a browser on the same computer on the same IP address / same networking setup?

@hsabaghpour
Copy link
Author

Yes I can, I even could download the video and Audio, the error message says :
ERROR: Postprocessing: ffprobe and ffmpeg not found. Please install or provide the path using --ffmpeg-location

They are both already installed
╰─➤ which ffprobe
/opt/homebrew/bin/ffprobe
But still the code does not want to work, any comment? here is the code:

import os
os.environ['PATH'] += ':/opt/homebrew/bin/'

url="https://www.youtube.com/watch?v=ly8orBNiNQM"
save_dir="/Users/alexparsee/Desktop/YouTube/"

loader = GenericLoader(
YoutubeAudioLoader([url],save_dir),
OpenAIWhisperParser()
)

docs = loader.load()

and here the full run + error msg :

[youtube] Extracting URL: https://www.youtube.com/watch?v=ly8orBNiNQM
[youtube] ly8orBNiNQM: Downloading webpage
[youtube] ly8orBNiNQM: Downloading ios player API JSON
[youtube] ly8orBNiNQM: Downloading m3u8 information
[info] ly8orBNiNQM: Downloading 1 format(s): 140
[download] Destination: /Users/alexparsee/Desktop/YouTube//Architectural Design Process | Form, Orientation and Sunlight.m4a
[download] 100% of 9.17MiB in 00:00:01 at 7.52MiB/s
WARNING: ly8orBNiNQM: writing DASH m4a. Only some players support this container. Install ffmpeg to fix this automatically
ERROR: Postprocessing: ffprobe and ffmpeg not found. Please install or provide the path using --ffmpeg-location

@bashonly
Copy link
Member

try adding 'ffmpeg_location': '/opt/homebrew/bin' to your ydl opts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question
Projects
None yet
Development

No branches or pull requests

2 participants