ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
131.65k stars 9.97k forks source link

Failed downloading Udemy Paid Course with ERROR: No Video Formats Found. #30914

Closed edwardtian closed 2 years ago

edwardtian commented 2 years ago

Checklist

Verbose log

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--download-archive', '--verbose', 'machine-learning-data-science-foundations-masterclass.txt', '--playlist-start', '1', '-R', 'infinite', '--fragment-retries', 'infinite', '-c', '-w', '-o', './Video/%(playlist)s/%(chapter_number)s - %(chapter)s/%(playlist_index)s %(title)s.%(ext)s', '--cookies', 'cookies.txt', '--verbose', 'https://www.udemy.com/machine-learning-data-science-foundations-masterclass/learn/']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2021.12.17
[debug] Python version 3.10.4 (CPython) - Linux-4.4.180+-x86_64-with-glibc2.35
[debug] exe versions: ffmpeg 4.4.1, ffprobe 4.4.1
[debug] Proxy map: {}
ERROR: 'machine-learning-data-science-foundations-masterclass.txt' is not a valid URL. Set --default-search "ytsearch" (or run  youtube-dl "ytsearch:machine-learning-data-science-foundations-masterclass.txt" ) to search YouTube
Traceback (most recent call last):
  File "/download/./youtube-dl/youtube_dl/YoutubeDL.py", line 815, in wrapper
    return func(self, *args, **kwargs)
  File "/download/./youtube-dl/youtube_dl/YoutubeDL.py", line 836, in __extract_info
    ie_result = ie.extract(url)
  File "/download/./youtube-dl/youtube_dl/extractor/common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "/download/./youtube-dl/youtube_dl/extractor/generic.py", line 2361, in _real_extract
    raise ExtractorError(
youtube_dl.utils.ExtractorError: 'machine-learning-data-science-foundations-masterclass.txt' is not a valid URL. Set --default-search "ytsearch" (or run  youtube-dl "ytsearch:machine-learning-data-science-foundations-masterclass.txt" ) to search YouTube

Description

Udemy Paid Course, youtube-dl can download the first video, but failed with ascendant videos(2, 3, ...).

edwardtian commented 2 years ago

I have searched the bugtracker for similar issues, but most of them are still open, the closed ones don't help to resolve the problem. So escalate this issue again.

dirkf commented 2 years ago

From the log, your command was s/t like:

youtube-dl --download-archive --verbose machine-learning-data-science-foundations-masterclass.txt --playlist-start 1 -R infinite --fragment-retries infinite -c -w -o './Video/%(playlist)s/%(chapter_number)s - %(chapter)s/%(playlist_index)s %(title)s.%(ext)s' --cookies cookies.txt --verbose 'https://www.udemy.com/machine-learning-data-science-foundations-masterclass/learn/'

yt-dl thinks you are trying to download the archive index: remove the first --verbose.

When you do that you will most likely reproduce #29925, or one of the other issues with Udemy (#29410, #29705). #29925 explains why the extractor is unlikely to be fixable.

edwardtian commented 2 years ago

Sorry for the wrong logs, here is the correct one:

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-U', '--verbose', '--download-archive', 'machine-learning-data-science-foundations-masterclass.txt', '--playlist-start', '3', '-R', 'infinite', '--fragment-retries', 'infinite', '-c', '-w', '-o', './Video/%(playlist)s/%(chapter_number)s - %(chapter)s/%(playlist_index)s %(title)s.%(ext)s', '--cookies', 'cookies.txt', 'https://www.udemy.com/machine-learning-data-science-foundations-masterclass/learn/']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2021.12.17
[debug] Python version 3.10.4 (CPython) - Linux-4.4.180+-x86_64-with-glibc2.35
[debug] exe versions: ffmpeg 4.4.1, ffprobe 4.4.1
[debug] Proxy map: {}
youtube-dl is up-to-date (2021.12.17)
[udemy:course] machine-learning-data-science-foundations-masterclass: Downloading webpage
[udemy:course] 3501832: Downloading course curriculum
[download] Downloading playlist: 3501832
[udemy:course] playlist 3501832: Collected 112 video ids (downloading 110 of them)
[download] Downloading video 1 of 110
[udemy] 22926440: Downloading webpage
[udemy] 22926440: Downloading lecture JSON
ERROR: No video formats found; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/download/./youtube-dl/youtube_dl/YoutubeDL.py", line 815, in wrapper
    return func(self, *args, **kwargs)
  File "/download/./youtube-dl/youtube_dl/YoutubeDL.py", line 836, in __extract_info
    ie_result = ie.extract(url)
  File "/download/./youtube-dl/youtube_dl/extractor/common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "/download/./youtube-dl/youtube_dl/extractor/udemy.py", line 408, in _real_extract
    self._sort_formats(formats, field_preference=('height', 'width', 'tbr', 'format_id'))
  File "/download/./youtube-dl/youtube_dl/extractor/common.py", line 1374, in _sort_formats
    raise ExtractorError('No video formats found')
youtube_dl.utils.ExtractorError: No video formats found; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
edwardtian commented 2 years ago

Here is another sample of error of No video formats found. The first video downloaded with success, but the second one failed:

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-U', '--verbose', '--download-archive', 'unrealcourse.txt', '--playlist-start', '1', '-R', 'infinite', '--fragment-retries', 'infinite', '-c', '-w', '-o', './Video/%(playlist)s/%(chapter_number)s - %(chapter)s/%(playlist_index)s %(title)s.%(ext)s', '--cookies', 'cookies.txt', 'https://www.udemy.com/unrealcourse/learn/']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2021.12.17
[debug] Python version 3.10.4 (CPython) - Linux-4.4.180+-x86_64-with-glibc2.35
[debug] exe versions: ffmpeg 4.4.1, ffprobe 4.4.1
[debug] Proxy map: {}
youtube-dl is up-to-date (2021.12.17)
[udemy:course] unrealcourse: Downloading webpage
[udemy:course] 657932: Downloading course curriculum
[download] Downloading playlist: 657932
[udemy:course] playlist 657932: Collected 205 video ids (downloading 205 of them)
[download] Downloading video 1 of 205
[udemy] 31718228: Downloading webpage
[udemy] 31718228: Downloading lecture JSON
[udemy] 40638416: Downloading m3u8 information
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on 'https://www.udemy.com/assets/40638416/files/2022-04-07_12-20-47-55b94283ca97e5c51a28a1ed662e5ec6/2/hls/AVC_1920x1080_6400k_AAC-HE_64k/aa00b9f1915722e0afa8e02c80204bdf5bd4.m3u8?provider=cloudfront&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJwYXRoIjoiMjAyMi0wNC0wN18xMi0yMC00Ny01NWI5NDI4M2NhOTdlNWM1MWEyOGExZWQ2NjJlNWVjNi8yLyIsImV4cCI6MTY1MTY5NTE0N30.iyI6RdVROngjeVhbqFpZ9jtNWFM864yqxnUEWNDXR8A&v=1'
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 27
[download] Destination: ./Video/657932/1 - Intro & Setup (New UE5 Content)/001 Welcome To The Course.mp4
[download] 100% of 115.04MiB in 04:02
[debug] ffmpeg command line: ffprobe -show_streams 'file:./Video/657932/1 - Intro & Setup (New UE5 Content)/001 Welcome To The Course.mp4'
[ffmpeg] Fixing malformed AAC bitstream in "./Video/657932/1 - Intro & Setup (New UE5 Content)/001 Welcome To The Course.mp4"
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i 'file:./Video/657932/1 - Intro & Setup (New UE5 Content)/001 Welcome To The Course.mp4' -c copy -f mp4 -bsf:a aac_adtstoasc 'file:./Video/657932/1 - Intro & Setup (New UE5 Content)/001 Welcome To The Course.temp.mp4'
[download] Downloading video 2 of 205
[udemy] 31718234: Downloading webpage
[udemy] 31718234: Downloading lecture JSON
ERROR: No video formats found; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/download/./youtube-dl/youtube_dl/YoutubeDL.py", line 815, in wrapper
    return func(self, *args, **kwargs)
  File "/download/./youtube-dl/youtube_dl/YoutubeDL.py", line 836, in __extract_info
    ie_result = ie.extract(url)
  File "/download/./youtube-dl/youtube_dl/extractor/common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "/download/./youtube-dl/youtube_dl/extractor/udemy.py", line 408, in _real_extract
    self._sort_formats(formats, field_preference=('height', 'width', 'tbr', 'format_id'))
  File "/download/./youtube-dl/youtube_dl/extractor/common.py", line 1374, in _sort_formats
    raise ExtractorError('No video formats found')
youtube_dl.utils.ExtractorError: No video formats found; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
dirkf commented 2 years ago

So, as above, you have duplicated #29925.