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.66k stars 9.97k forks source link

Unable to download webpage: HTTP Error 403: Forbidden (caused by <HTTPError 403: 'Forbidden'>) #26054

Closed vinodhkumar501 closed 2 years ago

vinodhkumar501 commented 4 years ago

Checklist

Verbose log

youtube-dl -v -u *******@gmail.com -p ****** https://www.udemy.com/course/draft/2030830/learn/lecture/15982114#overview                       [debug] System config: []                                                                                                                                               [debug] User config: []                                                                                                                                                 [debug] Custom config: []                                                                                                                                               [debug] Command-line args: ['-v', '-u', 'PRIVATE', '-p', 'PRIVATE', 'https://www.udemy.com/course/draft/2030830/learn/lecture/15982114#overview']                       [debug] Encodings: locale cp1252, fs utf-8, out utf-8, pref cp1252                                                                                                      [debug] youtube-dl version 2020.06.16.1                                                                                                                                 [debug] Python version 3.7.2 (CPython) - Windows-10-10.0.17763-SP0                                                                                                      [debug] exe versions: none                                                                                                                                              [debug] Proxy map: {}                                                                                                                                                   [udemy:course] Downloading login popup                                                                                                                                  ERROR: Unable to download webpage: HTTP Error 403: Forbidden (caused by <HTTPError 403: 'Forbidden'>); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.       File "c:\users\****\appdata\local\programs\python\python37\lib\site-packages\youtube_dl\extractor\common.py", line 627, in _request_webpage                              return self._downloader.urlopen(url_or_request)                                                                                                                       File "c:\users\****\appdata\local\programs\python\python37\lib\site-packages\youtube_dl\YoutubeDL.py", line 2238, in urlopen                                             return self._opener.open(req, timeout=self._socket_timeout)                                                                                                           File "c:\users\****\appdata\local\programs\python\python37\lib\urllib\request.py", line 531, in open                                                                     response = meth(req, response)                                                                                                                                        File "c:\users\****\appdata\local\programs\python\python37\lib\urllib\request.py", line 641, in http_response                                                            'http', request, response, code, msg, hdrs)                                                                                                                           File "c:\users\****\appdata\local\programs\python\python37\lib\urllib\request.py", line 569, in error                                                                    return self._call_chain(*args)                                                                                                                                        File "c:\users\****\appdata\local\programs\python\python37\lib\urllib\request.py", line 503, in _call_chain                                                              result = func(*args)                                                                                                                                                  File "c:\users\****\appdata\local\programs\python\python37\lib\urllib\request.py", line 649, in http_error_default                                                       raise HTTPError(req.full_url, code, msg, hdrs, fp) 

Description

Hi, i am trying to download udemy videos but couldn't download it i am getting the below trace back. I am using 2020 version of pip, also verified the previous issues reported nothing helped me. Thanks

Marcinosoft commented 4 years ago

Same for me using current: youtube-dl version 2020.07.28

Makanz commented 4 years ago

I got the same problem with version youtube-dl 2020.09.06

herrmayr commented 3 years ago

I'm running into the same issue ... version 2020.12.26

galovics commented 3 years ago

Still doesn't work althought I've found a workaround by using cookies from Chrome.

  1. Install the cookies.txt Chrome plugin: https://chrome.google.com/webstore/detail/get-cookiestxt/bgaddhkoddajcdgocldbbfleckgcbcid?hl=en
  2. Open Udemy in Chrome and log in
  3. Right click on the page anywhere and select Get cookies.txt (this will download a cookies.txt for you)
  4. Start youtube-dl with the --cookies option and pass the file as a parameter (youtube-dl --cookies udemy.com_cookies.txt URL)
dimitry-ishenko commented 3 years ago

Still doesn't work althought I've found a workaround by using cookies from Chrome.

  1. Install the cookies.txt Chrome plugin: https://chrome.google.com/webstore/detail/get-cookiestxt/bgaddhkoddajcdgocldbbfleckgcbcid?hl=en
  2. Open Udemy in Chrome and log in
  3. Right click on the page anywhere and select Get cookies.txt (this will download a cookies.txt for you)
  4. Start youtube-dl with the --cookies option and pass the file as a parameter (youtube-dl --cookies udemy.com_cookies.txt URL)

This no longer seems to work

dirkf commented 2 years ago

Continued in #29410.