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.89k stars 10k forks source link

Unable to download videos from Udemy #8967

Closed marcoacarvalho closed 8 years ago

marcoacarvalho commented 8 years ago

[marco@archdesktop Django]$ youtube-dl -v -u xxxxxx -p xxxxxxxx https://www.udemy.com/python-3-na-web-com-django-basico-intermediario/learn/v4/content [debug] System config: [] [debug] User config: [] [debug] Command-line args: ['-v', '-u', 'PRIVATE', '-p', 'PRIVATE', 'https://www.udemy.com/python-3-na-web-com-django-basico-intermediario/learn/v4/content'] [debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2016.03.18 [debug] Python version 3.5.1 - Linux-4.2.5-1-ARCH-x86_64-with-arch [debug] exe versions: ffmpeg 3.0, ffprobe 3.0, rtmpdump 2.4 [debug] Proxy map: {} [udemy:course] Downloading login popup [udemy:course] Logging in as xxxxxxxx [udemy:course] python-3-na-web-com-django-basico-intermediario: Downloading webpage [udemy:course] python-3-na-web-com-django-basico-intermediario: Downloading course JSON [udemy:course] 799014: Downloading course curriculum [download] Downloading playlist: Python 3 na Web com Django (Básico e Intermediário) [udemy:course] playlist Python 3 na Web com Django (Básico e Intermediário): Collected 88 video ids (downloading 88 of them) [download] Downloading video 1 of 88 [udemy] Downloading login popup [udemy] 4791586: Downloading webpage [udemy] 4791586: Downloading lecture JSON Traceback (most recent call last): File "/usr/bin/youtube-dl", line 9, in load_entry_point('youtube-dl==2016.3.18', 'console_scripts', 'youtube-dl')() File "/usr/lib/python3.5/site-packages/youtube_dl/init.py", line 419, in main _real_main(argv) File "/usr/lib/python3.5/site-packages/youtube_dl/init.py", line 409, in _real_main retcode = ydl.download(all_urls) File "/usr/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 1719, in download url, force_generic_extractor=self.params.get('force_generic_extractor', False)) File "/usr/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 679, in extract_info return self.process_ie_result(ie_result, download, extra_info) File "/usr/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 839, in process_ie_result extra_info=extra) File "/usr/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 736, in process_ie_result extra_info=extra_info, download=False, process=False) File "/usr/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 668, in extract_info ie_result = ie.extract(url) File "/usr/lib/python3.5/site-packages/youtube_dl/extractor/common.py", line 320, in extract return self._real_extract(url) File "/usr/lib/python3.5/site-packages/youtube_dl/extractor/udemy.py", line 183, in _realextract for format in asset.get('download_urls', {}).get('Video', []): AttributeError: 'NoneType' object has no attribute 'get'

dstftw commented 8 years ago

This issue is already fixed and fix will be incorporated in the next version of youtube-dl.

marcoacarvalho commented 8 years ago

Thank you

marcoacarvalho commented 8 years ago

I got the latest version of extractor/udemy.py and the error changed:

[udemy:course] 799014: Downloading course curriculum [download] Downloading playlist: Python 3 na Web com Django (Básico e Intermediário) [udemy:course] playlist Python 3 na Web com Django (Básico e Intermediário): Collected 88 video ids (downloading 88 of them) [download] Downloading video 1 of 88 [udemy] Downloading login popup [udemy] 4791586: Downloading webpage [udemy] 4791586: Downloading lecture JSON [debug] Invoking downloader on 'http://knowband-asset-bucket.s3.amazonaws.com/2016-03-22_00-40-41-8ffce92f1f994577c18de814aa4f6999/WebHD_1080.mp4' ERROR: unable to download video data: HTTP Error 403: Forbidden Traceback (most recent call last): File "/usr/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 1627, in process_info success = dl(filename, info_dict) File "/usr/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 1569, in dl return fd.download(name, info) File "/usr/lib/python3.5/site-packages/youtube_dl/downloader/common.py", line 350, in download return self.real_download(filename, info_dict) File "/usr/lib/python3.5/site-packages/youtube_dl/downloader/http.py", line 58, in real_download data = self.ydl.urlopen(request) File "/usr/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 1929, in urlopen return self._opener.open(req, timeout=self._socket_timeout) File "/usr/lib/python3.5/urllib/request.py", line 471, in open response = meth(req, response) File "/usr/lib/python3.5/urllib/request.py", line 581, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib/python3.5/urllib/request.py", line 509, in error return self._call_chain(_args) File "/usr/lib/python3.5/urllib/request.py", line 443, in _call_chain result = func(_args) File "/usr/lib/python3.5/urllib/request.py", line 589, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 403: Forbidden

dstftw commented 8 years ago

Post verbose output.

marcoacarvalho commented 8 years ago

Note: from web browser I can watch just fine.

[marco@archdesktop Django]$ youtube-dl --verbose -u xxxx -p xxxx https://www.udemy.com/python-3-na-web-com-django-basico-intermediario/learn/v4/ [debug] System config: [] [debug] User config: [] [debug] Command-line args: ['--verbose', '-u', 'PRIVATE', '-p', 'PRIVATE', 'https://www.udemy.com/python-3-na-web-com-django-basico-intermediario/learn/v4/'] [debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2016.03.18 [debug] Python version 3.5.1 - Linux-4.2.5-1-ARCH-x86_64-with-arch [debug] exe versions: ffmpeg 3.0, ffprobe 3.0, rtmpdump 2.4 [debug] Proxy map: {} [udemy:course] Downloading login popup [udemy:course] Logging in as xxxxx [udemy:course] python-3-na-web-com-django-basico-intermediario: Downloading webpage [udemy:course] python-3-na-web-com-django-basico-intermediario: Downloading course JSON [udemy:course] 799014: Downloading course curriculum [download] Downloading playlist: Python 3 na Web com Django (Básico e Intermediário) [udemy:course] playlist Python 3 na Web com Django (Básico e Intermediário): Collected 88 video ids (downloading 88 of them) [download] Downloading video 1 of 88 [udemy] Downloading login popup [udemy] 4791586: Downloading webpage [udemy] 4791586: Downloading lecture JSON [debug] Invoking downloader on 'http://knowband-asset-bucket.s3.amazonaws.com/2016-03-22_00-40-41-8ffce92f1f994577c18de814aa4f6999/WebHD_1080.mp4' ERROR: unable to download video data: HTTP Error 403: Forbidden Traceback (most recent call last): File "/usr/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 1627, in process_info success = dl(filename, info_dict) File "/usr/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 1569, in dl return fd.download(name, info) File "/usr/lib/python3.5/site-packages/youtube_dl/downloader/common.py", line 350, in download return self.real_download(filename, info_dict) File "/usr/lib/python3.5/site-packages/youtube_dl/downloader/http.py", line 58, in real_download data = self.ydl.urlopen(request) File "/usr/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 1929, in urlopen return self._opener.open(req, timeout=self._socket_timeout) File "/usr/lib/python3.5/urllib/request.py", line 471, in open response = meth(req, response) File "/usr/lib/python3.5/urllib/request.py", line 581, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib/python3.5/urllib/request.py", line 509, in error return self._call_chain(_args) File "/usr/lib/python3.5/urllib/request.py", line 443, in _call_chain result = func(_args) File "/usr/lib/python3.5/urllib/request.py", line 589, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 403: Forbidden

jaan143 commented 8 years ago

Same here after update youtube-dl PS C:\Users\vicky> youtube-dl --verbose -u @gmail.com -p **** -o '~/MyVideos/%(playlist)s/%(chapter_numbe r)s - %(chapter)s/%(title)s.%(ext)s' https://www.udemy.com/electric-bass-right-from-the-start/ [debug] System config: [] [debug] User config: [] [debug] Command-line args: ['--verbose', '-u', 'PRIVATE', '-p', 'PRIVATE', '-o', '~/MyVideos/%(playlist)s/%(chapter_number)s - %(chapter)s/%(title)s.%(ext)s', 'https://www.udemy.com/electric-bass-right-from-the-start/'] [debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252 [debug] youtube-dl version 2016.03.25 [debug] Python version 3.4.3 - Windows-8-6.2.9200 [debug] exe versions: none [debug] Proxy map: {} [udemy:course] Downloading login popup [udemy:course] Logging in as _@gmail.com [udemy:course] electric-bass-right-from-the-start: Downloading webpage [udemy:course] electric-bass-right-from-the-start: Downloading course JSON [udemy:course] 277770: Downloading course curriculum [download] Downloading playlist: Electric Bass Right From The Start [udemy:course] playlist Electric Bass Right From The Start: Collected 9 video ids (downloading 9 of them) [download] Downloading video 1 of 9 [udemy] Downloading login popup [udemy] 4580906: Downloading webpage [udemy] 4580906: Downloading lecture JSON [debug] Invoking downloader on 'http://knowband-asset-bucket.s3.amazonaws.com/2016-03-04_13-31-54-60a1590c65ee6323da7220abda8066da/WebHD_720p.mp4' ERROR: unable to download video data: HTTP Error 403: Forbidden Traceback (most recent call last): File "c:\python34\lib\site-packages\youtube_dl\YoutubeDL.py", line 1627, in process_info success = dl(filename, info_dict) File "c:\python34\lib\site-packages\youtube_dl\YoutubeDL.py", line 1569, in dl return fd.download(name, info) File "c:\python34\lib\site-packages\youtube_dl\downloader\common.py", line 350, in download return self.real_download(filename, info_dict) File "c:\python34\lib\site-packages\youtube_dl\downloader\http.py", line 58, in real_download data = self.ydl.urlopen(request) File "c:\python34\lib\site-packages\youtube_dl\YoutubeDL.py", line 1929, in urlopen return self._opener.open(req, timeout=self._socket_timeout) File "c:\python34\lib\urllib\request.py", line 469, in open response = meth(req, response) File "c:\python34\lib\urllib\request.py", line 579, in http_response 'http', request, response, code, msg, hdrs) File "c:\python34\lib\urllib\request.py", line 507, in error return self._call_chain(_args) File "c:\python34\lib\urllib\request.py", line 441, in _call_chain result = func(*args) File "c:\python34\lib\urllib\request.py", line 587, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 403: Forbidden

PS C:\Users\vicky>