coursera-dl / edx-dl

A simple tool to download video lectures from edx.org (and other openedx sites)
GNU Lesser General Public License v3.0
1.93k stars 638 forks source link

Unsupported URL #554

Open arsanysamuel opened 5 years ago

arsanysamuel commented 5 years ago

Subject of the issue

I have a trouble downloading the CS50 course It gives an error at a certain point I have the latest versions of youtube-dl and edx-dl

Your environment

Steps to reproduce

edx-dl -u "username" -p "password -s https://courses.edx.org/courses/course-v1:HarvardX+CS50+X/course/.

Actual behaviour

[download] 100% of 148.96MiB [download] https://www.youtube.com/embed/F9oOfRyjJw?autoplay=1&rel=0 => Downloaded/CS50s_Introduction_to_Computer_Science/01-CS50x2019/32-%(title)s-%(id)s.%(ext)s Downloading video with URL https://www.youtube.com/embed/F9oOfRyjJw?autoplay=1&rel=0 from YouTube. [youtube:user] embed: Downloading channel page [youtube:playlist] UUaHofiHZt-qSj7yg-pu2pGg: Downloading webpage [download] Downloading playlist: Uploads from embed [youtube:playlist] playlist Uploads from embed: Downloading 0 videos [download] Finished downloading playlist: Uploads from embed [download] https://youtu.be/F9oOfRyjJw => Downloaded/CS50s_Introduction_to_Computer_Science/01-CS50x2019/32-%(title)s-%(id)s.%(ext)s Downloading video with URL https://youtu.be/F9oOfRyjJw from YouTube. [generic] F9oOfRyjJw: Requesting header [redirect] Following redirect to https://www.youtube.com/watch?v=F9oOfRyjJw&feature=youtu.be [generic] watch?v=F9oOfRyjJw&feature=youtu: Requesting header WARNING: Falling back on generic information extractor. [generic] watch?v=F9oOfRyjJw&feature=youtu: Downloading webpage [generic] watch?v=F9oOfRyjJw&feature=youtu: Extracting information ERROR: Unsupported URL: https://www.youtube.com/watch?v=F9oOfRyjJw&feature=youtu.be Traceback (most recent call last): File "/usr/local/bin/edx-dl", line 11, in load_entry_point('edx-dl==0.1.10', 'console_scripts', 'edx-dl')() File "/usr/local/lib/python3.7/site-packages/edx_dl/edx_dl.py", line 1068, in main download(args, selections, filtered_units, headers) File "/usr/local/lib/python3.7/site-packages/edx_dl/edx_dl.py", line 845, in download headers) File "/usr/local/lib/python3.7/site-packages/edx_dl/edx_dl.py", line 817, in download_unit skip_or_download(res_downloads, headers, args) File "/usr/local/lib/python3.7/site-packages/edx_dl/edx_dl.py", line 776, in skip_or_download f(url, filename, headers, args) File "/usr/local/lib/python3.7/site-packages/edx_dl/edx_dl.py", line 702, in download_url download_youtube_url(url, filename, headers, args) File "/usr/local/lib/python3.7/site-packages/edx_dl/edx_dl.py", line 749, in download_youtube_url execute_command(cmd, args) File "/usr/local/lib/python3.7/site-packages/edx_dl/utils.py", line 42, in execute_command raise e File "/usr/local/lib/python3.7/site-packages/edx_dl/utils.py", line 37, in execute_command subprocess.check_call(cmd) File "/usr/lib64/python3.7/subprocess.py", line 347, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['youtube-dl', '--ignore-config', '-o', 'Downloaded/CS50s_Introduction_to_Computer_Science/01-CS50x2019/32-%(title)s-%(id)s.%(ext)s', '-f', 'mp4', '--all-subs', 'https://youtu.be/F9oOfRyjJw']' returned non-zero exit status 1.

Edit: I discovered that the video is unavailable on youtube but it's in the course page first video https://courses.edx.org/courses/course-v1:HarvardX+CS50+X/courseware/6f10d1f2fb0548ada175ba2ed508f50c/39e02c88c722454d84159660470f6422/1?activate_block_id=block-v1%3AHarvardX%2BCS50%2BX%2Btype%40vertical%2Bblock%40c5b4477b06b7438e9a9172fe9a6eea2c

VigneshRamanathan101 commented 3 years ago

I got the issue in Windows 10 for https://courses.edx.org/courses/course-v1:MITx+18.01.1x+2T2020/course/ Downloading video with URL https://youtube.com/watch?v=W7afoUjlDVA from YouTube. [youtube] W7afoUjlDVA: Downloading webpage [download] Destination: Downloaded\Calculus_1A-_Differentiation\06-Unit_4-_Applications\11-MIT180312016-V019300-W7afoUjlDVA.mp4 [download] 100% of 4.83MiB in 00:01 [download] https://youtube.com/watch?v=QTkcd9plVNA => Downloaded\Calculus_1A-_Differentiation\06-Unit_4-_Applications\12-%(title)s-%(id)s.%(ext)s Downloading video with URL https://youtube.com/watch?v=QTkcd9plVNA from YouTube. [youtube] QTkcd9plVNA: Downloading webpage [download] Destination: Downloaded\Calculus_1A-_Differentiation\06-Unit_4-_Applications\12-MIT180312016-V019100-QTkcd9plVNA.mp4 [download] 100% of 8.39MiB in 00:02 [download] https://youtube.com/watch?v=gGjGi5orqJw => Downloaded\Calculus_1A-_Differentiation\06-Unit_4-_Applications\13-%(title)s-%(id)s.%(ext)s Downloading video with URL https://youtube.com/watch?v=gGjGi5orqJw from YouTube. [youtube] gGjGi5orqJw: Downloading webpage [download] Destination: Downloaded\Calculus_1A-_Differentiation\06-Unit_4-_Applications\13-Sequence 15_HQ.mp4-gGjGi5orqJw.mp4 [download] 100% of 53.80MiB in 00:26 [download] https://youtube.com/watch?v=8JWfu0oNr9g => Downloaded\Calculus_1A-_Differentiation\06-Unit_4-_Applications\14-%(title)s-%(id)s.%(ext)s Downloading video with URL https://youtube.com/watch?v=8JWfu0oNr9g from YouTube. [youtube] 8JWfu0oNr9g: Downloading webpage [youtube] 8JWfu0oNr9g: Downloading MPD manifest [download] Got server HTTP error: HTTP Error 500: Internal Server Error. Retrying (attempt 1 of 10)... [download] Got server HTTP error: HTTP Error 500: Internal Server Error. Retrying (attempt 2 of 10)... [download] Got server HTTP error: HTTP Error 500: Internal Server Error. Retrying (attempt 3 of 10)... [download] Got server HTTP error: HTTP Error 500: Internal Server Error. Retrying (attempt 4 of 10)... [download] Got server HTTP error: HTTP Error 500: Internal Server Error. Retrying (attempt 5 of 10)... [download] Got server HTTP error: HTTP Error 500: Internal Server Error. Retrying (attempt 6 of 10)... [download] Got server HTTP error: HTTP Error 500: Internal Server Error. Retrying (attempt 7 of 10)... [download] Got server HTTP error: HTTP Error 500: Internal Server Error. Retrying (attempt 8 of 10)... [download] Got server HTTP error: HTTP Error 500: Internal Server Error. Retrying (attempt 9 of 10)... [download] Got server HTTP error: HTTP Error 500: Internal Server Error. Retrying (attempt 10 of 10)... ERROR: giving up after 10 retries Traceback (most recent call last): File "c:\users\vigne\appdata\local\programs\python\python38-32\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "c:\users\vigne\appdata\local\programs\python\python38-32\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\vigne\AppData\Local\Programs\Python\Python38-32\Scripts\edx-dl.exe__main__.py", line 7, in File "c:\users\vigne\appdata\local\programs\python\python38-32\lib\site-packages\edx_dl\edx_dl.py", line 1073, in main download(args, selections, filtered_units, headers) File "c:\users\vigne\appdata\local\programs\python\python38-32\lib\site-packages\edx_dl\edx_dl.py", line 849, in download download_unit(unit, args, target_dir, filename_prefix, File "c:\users\vigne\appdata\local\programs\python\python38-32\lib\site-packages\edx_dl\edx_dl.py", line 811, in download_unit download_video(unit.videos[0], args, target_dir, filename_prefix, File "c:\users\vigne\appdata\local\programs\python\python38-32\lib\site-packages\edx_dl\edx_dl.py", line 794, in download_video skip_or_download(youtube_downloads, headers, args) File "c:\users\vigne\appdata\local\programs\python\python38-32\lib\site-packages\edx_dl\edx_dl.py", line 781, in skip_or_download f(url, filename, headers, args) File "c:\users\vigne\appdata\local\programs\python\python38-32\lib\site-packages\edx_dl\edx_dl.py", line 707, in download_url download_youtube_url(url, filename, headers, args) File "c:\users\vigne\appdata\local\programs\python\python38-32\lib\site-packages\edx_dl\edx_dl.py", line 754, in download_youtube_url execute_command(cmd, args) File "c:\users\vigne\appdata\local\programs\python\python38-32\lib\site-packages\edx_dl\utils.py", line 42, in execute_command raise e File "c:\users\vigne\appdata\local\programs\python\python38-32\lib\site-packages\edx_dl\utils.py", line 37, in execute_command subprocess.check_call(cmd) File "c:\users\vigne\appdata\local\programs\python\python38-32\lib\subprocess.py", line 364, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['youtube-dl', '--ignore-config', '-o', 'Downloaded\Calculus_1A-_Differentiation\06-Unit_4-_Applications\14-%(title)s-%(id)s.%(ext)s', '-f', 'mp4', 'https://youtube.com/watch?v=8JWfu0oNr9g']' returned non-zero exit status 1.