Repository: yt-dlp
Issue: Cannot download video from udemy
Labels: account-needed,site-bug,can-share-account

Hi there,
I got 403 error when downloading course from udemy business. I used command:
`yt-dlp -u udemy@abc.com -p password -P '~/Downloads' -o '%(playlist)s/%(chapter_number)s - %(chapter)s/%(title)s.%(ext)s' https://abc.udemy.com/course/ielts-vocab-builder-002/`
I'm sure that the username/password in command is correct. Please see the log:
```
[debug] Command-line config: ['-u', 'PRIVATE', '-p', 'PRIVATE', '-P', "'~/Downloads'", '-o', "'%(playlist)s/%(chapter_number)s", '-', "%(chapter)s/%(title)s.%(ext)s'", 'https://abc.udemy.com/course/ielts-vocab-builder-002/', '-v']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, pref cp1252
[debug] yt-dlp version 2021.09.25 (exe)
[debug] Python version 3.8.10 (CPython 64bit) - Windows-10-10.0.18363-SP0
[debug] exe versions: none
[debug] Optional libraries: Crypto, mutagen, sqlite, websockets
[debug] Proxy map: {}
[debug] [generic] Extracting URL: -
ERROR: [generic] '-' is not a valid URL. Set --default-search "ytsearch" (or run  yt-dlp "ytsearch:-" ) to search YouTube
Traceback (most recent call last):
  File "yt_dlp\extractor\common.py", line 585, in extract
  File "yt_dlp\extractor\generic.py", line 2490, in _real_extract
yt_dlp.utils.ExtractorError: '-' is not a valid URL. Set --default-search "ytsearch" (or run  yt-dlp "ytsearch:-" ) to search YouTube
Traceback (most recent call last):
  File "yt_dlp\extractor\common.py", line 585, in extract
  File "yt_dlp\extractor\generic.py", line 2490, in _real_extract
yt_dlp.utils.ExtractorError: '-' is not a valid URL. Set --default-search "ytsearch" (or run  yt-dlp "ytsearch:-" ) to search YouTube

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.py", line 1227, in wrapper
  File "yt_dlp\YoutubeDL.py", line 1252, in __extract_info
  File "yt_dlp\extractor\common.py", line 601, in extract
yt_dlp.utils.ExtractorError: [generic] '-' is not a valid URL. Set --default-search "ytsearch" (or run  yt-dlp "ytsearch:-" ) to search YouTube

[debug] [generic] Extracting URL: %(chapter)s/%(title)s.%(ext)s'
ERROR: [generic] "%(chapter)s/%(title)s.%(ext)s'" is not a valid URL. Set --default-search "ytsearch" (or run  yt-dlp "ytsearch:%(chapter)s/%(title)s.%(ext)s'" ) to search YouTube
Traceback (most recent call last):
  File "yt_dlp\extractor\common.py", line 585, in extract
  File "yt_dlp\extractor\generic.py", line 2490, in _real_extract
yt_dlp.utils.ExtractorError: "%(chapter)s/%(title)s.%(ext)s'" is not a valid URL. Set --default-search "ytsearch" (or run  yt-dlp "ytsearch:%(chapter)s/%(title)s.%(ext)s'" ) to search YouTube
Traceback (most recent call last):
  File "yt_dlp\extractor\common.py", line 585, in extract
  File "yt_dlp\extractor\generic.py", line 2490, in _real_extract
yt_dlp.utils.ExtractorError: "%(chapter)s/%(title)s.%(ext)s'" is not a valid URL. Set --default-search "ytsearch" (or run  yt-dlp "ytsearch:%(chapter)s/%(title)s.%(ext)s'" ) to search YouTube

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.py", line 1227, in wrapper
  File "yt_dlp\YoutubeDL.py", line 1252, in __extract_info
  File "yt_dlp\extractor\common.py", line 601, in extract
yt_dlp.utils.ExtractorError: [generic] "%(chapter)s/%(title)s.%(ext)s'" is not a valid URL. Set --default-search "ytsearch" (or run  yt-dlp "ytsearch:%(chapter)s/%(title)s.%(ext)s'" ) to search YouTube

[udemy:course] Downloading login popup
ERROR: [udemy:course] course: Unable to download webpage: HTTP Error 403: Forbidden (caused by <HTTPError 403: 'Forbidden'>); please report this issue on  https://github.com/yt-dlp/yt-dlp . Make sure you are using the latest version; see  https://github.com/yt-dlp/yt-dlp  on how to update. Be sure to call yt-dlp with the --verbose flag and include its complete output.
  File "yt_dlp\extractor\common.py", line 694, in _request_webpage
  File "yt_dlp\YoutubeDL.py", line 3256, in urlopen
  File "urllib\request.py", line 531, in open
  File "urllib\request.py", line 640, in http_response
  File "urllib\request.py", line 569, in error
  File "urllib\request.py", line 502, in _call_chain
  File "urllib\request.py", line 649, in http_error_default
```