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.39k stars 9.96k forks source link

403 forbiden (seems like because of double requests ) #26393

Open kolet opened 4 years ago

kolet commented 4 years ago

Checklist

Verbose log

C:\Users\X\AppData\Roaming\youtube-dlg>youtube-dl.exe --newline -i -o "C:\Users\X\%(title)s.%(ext)s" --ignore-config -f best "https://5a153f939af4b.streamlock.net/academy/45221/m
anifest.mpd?tID=6&videoView=0&accessToken=a83dbd079ca0457d8bda9c99049bc8a6" --no-check-certificate   --verbose
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--newline', '-i', '-o', 'C:\\Users\\X\\%(title)s.%(ext)s', '--ignore-config', '-f', 'best', 'https://5a153f939af4b.streamlock.net/academy/45221/manife
st.mpd?tID=6&videoView=0&accessToken=a83dbd079ca0457d8bda9c99049bc8a6', '--no-check-certificate', '--verbose']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2020.07.28
[debug] Python version 3.4.4 (CPython) - Windows-7-6.1.7601-SP1
[debug] exe versions: none
[debug] Proxy map: {}
[generic] manifest: Requesting header
WARNING: Could not send HEAD request to https://5a153f939af4b.streamlock.net/academy/45221/manifest.mpd?tID=6&videoView=0&accessToken=a83dbd079ca0457d8bda9c99049bc8a6: HTTP Error 4
03: Forbidden
[generic] manifest: Downloading webpage
ERROR: Unable to download webpage: HTTP Error 403: Forbidden (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version
; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpq2whuxta\build\youtube_dl\extractor\common.py", line 627, in _request_webpage
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpq2whuxta\build\youtube_dl\YoutubeDL.py", line 2238, in urlopen
  File "C:\Python\Python34\lib\urllib\request.py", line 470, in open
  File "C:\Python\Python34\lib\urllib\request.py", line 580, in http_response
  File "C:\Python\Python34\lib\urllib\request.py", line 508, in error
  File "C:\Python\Python34\lib\urllib\request.py", line 442, in _call_chain
  File "C:\Python\Python34\lib\urllib\request.py", line 588, in http_error_default

Description

something to mention before the details , the mpd is only availble with a valid token, and this token is valid only ones, after using a get/post request via this token it get revoke so u cant use the same token twice.

while using youtube-dl it receive a 403 forbiden , however using streamlink with the same link (with a new token) it does not get a 403 forbiden. at first i thought perhaps its a user-agent or any other type of restriction but its not, 1, i tried with different headers and user-agent (with the same headers as my browser) 2, i used curl & wget with the same link (with different valid token) , no one of them receive a 403.
2.a the token was received from a browser , meaning the token is does not being validated /post with the user-agent. 3, since the token is only valid ones , the token get revoked after the second time of use, and this is when the 403 forbiden comes in, 3, u will get the 403 after u used the token ones.

i am not sure but maybe youtube-dl goes and check if its availble and then goes back to it to download it ? (meaning it does 2 request to it.?) (because it seems like that > > > https://imgur.com/vcvdN4G )

thanks

kolet commented 4 years ago

?

kolet commented 4 years ago

anyone?

liamengland1 commented 4 years ago

The maintainers seem to be on a break. No commits for 2 weeks. What website are you trying to download from (where is the stream from)?

kolet commented 4 years ago

hmm i wonder when they will come back to fix this , or at least adding a feature for -noack or -nocheck or something like that .