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

YouTube-dl cannot download Udemy course videos failing with, ERROR: unable to download video data: HTTP Error 403: Forbidden #16367

Closed
drax07 opened this issue May 3, 2018 · 0 comments
Labels

Comments

@drax07
Copy link

@drax07 drax07 commented May 3, 2018

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like this: [x])
  • Use the Preview tab to see what your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is

YouTube-dl Version:
2018.05.01
on Windows 10 64-bit

Before submitting an issue make sure you have:

  • [X ] At least skimmed through the README, most notably the FAQ and BUGS sections
  • [ X] Searched the bugtracker for similar issues including closed ones
  • [X ] Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

What is the purpose of your issue?

  • [X ] Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


Trying to Download a Udemy course for offline viewing and I keep getting a 403 error.
I downloaded the course site's cookies using cookies.txt for Google Chrome.
[X] yes I have access to the course in my account
[X] yes i have verified that my account credentials are correct
*note that USER is replacing the username of the account, so that shouldn't be an error

attempted to run
>youtube-dl.exe --verbose --cookies C:\Users\USER\Desktop\cookies.txt -u email@email.com -p mypassword https://www.udemy.com/learn-web-development-complete-step-by-step-guide-to-success/learn/v4/content
MY LOG

ERROR: unable to download video data: HTTP Error 403: Forbidden
Traceback (most recent call last):
  File "c:\users\USER\appdata\local\programs\python\python36\lib\site-packages\youtube_dl\YoutubeDL.py", line 1900, in process_info
    success = dl(filename, info_dict)
  File "c:\users\USER\appdata\local\programs\python\python36\lib\site-packages\youtube_dl\YoutubeDL.py", line 1839, in dl
    return fd.download(name, info)
  File "c:\users\USER\appdata\local\programs\python\python36\lib\site-packages\youtube_dl\downloader\common.py", line 365, in download
    return self.real_download(filename, info_dict)
  File "c:\users\USER\appdata\local\programs\python\python36\lib\site-packages\youtube_dl\downloader\http.py", line 340, in real_download
    establish_connection()
  File "c:\users\USER\appdata\local\programs\python\python36\lib\site-packages\youtube_dl\downloader\http.py", line 109, in establish_connection
    ctx.data = self.ydl.urlopen(request)
  File "c:\users\USER\appdata\local\programs\python\python36\lib\site-packages\youtube_dl\YoutubeDL.py", line 2203, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "c:\users\USER\appdata\local\programs\python\python36\lib\urllib\request.py", line 532, in open
    response = meth(req, response)
  File "c:\users\USER\appdata\local\programs\python\python36\lib\urllib\request.py", line 642, in http_response
    'http', request, response, code, msg, hdrs)
  File "c:\users\USER\appdata\local\programs\python\python36\lib\urllib\request.py", line 570, in error
    return self._call_chain(*args)
  File "c:\users\USER\appdata\local\programs\python\python36\lib\urllib\request.py", line 504, in _call_chain
    result = func(*args)
  File "c:\users\USER\appdata\local\programs\python\python36\lib\urllib\request.py", line 650, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden

I attempted other flags as per suggestions that I found online, these include...
youtube-dl.exe --verbose --no-cache-dir --cookies C:\Users\USER\Desktop\cookies.txt -u email@email.com -p mypassword https://www.udemy.com/learn-web-development-complete-step-by-step-guide-to-success/learn/v4/content

Resulting in:

ERROR: unable to download video data: HTTP Error 403: Forbidden
Traceback (most recent call last):
  File "c:\users\USER\appdata\local\programs\python\python36\lib\site-packages\youtube_dl\YoutubeDL.py", line 1900, in process_info
    success = dl(filename, info_dict)
  File "c:\users\USER\appdata\local\programs\python\python36\lib\site-packages\youtube_dl\YoutubeDL.py", line 1839, in dl
    return fd.download(name, info)
  File "c:\users\USER\appdata\local\programs\python\python36\lib\site-packages\youtube_dl\downloader\common.py", line 365, in download
    return self.real_download(filename, info_dict)
  File "c:\users\USER\appdata\local\programs\python\python36\lib\site-packages\youtube_dl\downloader\http.py", line 340, in real_download
    establish_connection()
  File "c:\users\USER\appdata\local\programs\python\python36\lib\site-packages\youtube_dl\downloader\http.py", line 109, in establish_connection
    ctx.data = self.ydl.urlopen(request)
  File "c:\users\USER\appdata\local\programs\python\python36\lib\site-packages\youtube_dl\YoutubeDL.py", line 2203, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "c:\users\USER\appdata\local\programs\python\python36\lib\urllib\request.py", line 532, in open
    response = meth(req, response)
  File "c:\users\USER\appdata\local\programs\python\python36\lib\urllib\request.py", line 642, in http_response
    'http', request, response, code, msg, hdrs)
  File "c:\users\USER\appdata\local\programs\python\python36\lib\urllib\request.py", line 570, in error
    return self._call_chain(*args)
  File "c:\users\USER\appdata\local\programs\python\python36\lib\urllib\request.py", line 504, in _call_chain
    result = func(*args)
  File "c:\users\USER\appdata\local\programs\python\python36\lib\urllib\request.py", line 650, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden

and also,
youtube-dl.exe --verbose --sleep-interval 15 --max-sleep-interval 60 -u email@email.com -p mypassword https://www.udemy.com/learn-web-development-complete-step-by-step-guide-to-success/learn/v4/content
reuslting in,

[download] Sleeping 59.62 seconds...
ERROR: unable to download video data: HTTP Error 403: Forbidden
Traceback (most recent call last):
  File "c:\users\USER\appdata\local\programs\python\python36\lib\site-packages\youtube_dl\YoutubeDL.py", line 1900, in process_info
    success = dl(filename, info_dict)
  File "c:\users\USER\appdata\local\programs\python\python36\lib\site-packages\youtube_dl\YoutubeDL.py", line 1839, in dl
    return fd.download(name, info)
  File "c:\users\USER\appdata\local\programs\python\python36\lib\site-packages\youtube_dl\downloader\common.py", line 365, in download
    return self.real_download(filename, info_dict)
  File "c:\users\USER\appdata\local\programs\python\python36\lib\site-packages\youtube_dl\downloader\http.py", line 340, in real_download
    establish_connection()
  File "c:\users\USER\appdata\local\programs\python\python36\lib\site-packages\youtube_dl\downloader\http.py", line 109, in establish_connection
    ctx.data = self.ydl.urlopen(request)
  File "c:\users\USER\appdata\local\programs\python\python36\lib\site-packages\youtube_dl\YoutubeDL.py", line 2203, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "c:\users\USER\appdata\local\programs\python\python36\lib\urllib\request.py", line 532, in open
    response = meth(req, response)
  File "c:\users\USER\appdata\local\programs\python\python36\lib\urllib\request.py", line 642, in http_response
    'http', request, response, code, msg, hdrs)
  File "c:\users\USER\appdata\local\programs\python\python36\lib\urllib\request.py", line 570, in error
    return self._call_chain(*args)
  File "c:\users\USER\appdata\local\programs\python\python36\lib\urllib\request.py", line 504, in _call_chain
    result = func(*args)
  File "c:\users\USER\appdata\local\programs\python\python36\lib\urllib\request.py", line 650, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden


Description of your issue, suggested solution and other information

Explanation of your issue in arbitrary form goes here. Please make sure the description is worded well enough to be understood. Provide as much context and examples as possible.
If work on your issue requires account credentials please provide them or explain how one can obtain them.

@dstftw dstftw closed this May 3, 2018
@dstftw dstftw added the duplicate label May 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.