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
132.01k stars 10.01k forks source link

youtube-dl seems to ignore port in m3u8 url #22189

Open issuer1 opened 5 years ago

issuer1 commented 5 years ago

Checklist

Verbose log

youtube-dl --verbose "http://driveproxy.net/drive/MlA3M2xCUmNSU3RlQWoyYW1HMllYQT09.html?hls=1"
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--verbose', 'http://driveproxy.net/drive/MlA3M2xCUm
NSU3RlQWoyYW1HMllYQT09.html?hls=1']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2019.08.13
[debug] Python version 3.4.4 (CPython) - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg 3.2.1
[debug] Proxy map: {}
[generic] MlA3M2xCUmNSU3RlQWoyYW1HMllYQT09: Requesting header
WARNING: Falling back on generic information extractor.
[generic] MlA3M2xCUmNSU3RlQWoyYW1HMllYQT09: Downloading webpage
[generic] MlA3M2xCUmNSU3RlQWoyYW1HMllYQT09: Extracting information
[generic] hdplay: Downloading m3u8 information
ERROR: Failed to download m3u8 information: HTTP Error 404: Not Found (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 y
outube-dl with the --verbose flag and include its complete output.
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp5b8vs7
2_\build\youtube_dl\extractor\common.py", line 627, in _request_webpage
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp5b8vs7
2_\build\youtube_dl\YoutubeDL.py", line 2229, 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_defau
lt

Description

Downloading gives a 404 error in yt-dl but not in browser.

From another tool I know that this link refers to an m3u8 file on an url similar to this one: http://95.211.141.81:8080/hdplay-cache/eygdlhm7z2rmda63yoljex3wbqjds5dxbzezx2eqm3b2rrhg7bdqrk4a5jux6jc4sdgyaltbd7mayyasp77rt45zjvaroti6ombp2e7m2l3v5jodgkfntvqlckin3iicrzu5pm2g6n5wcds7jrve5mzzaic3ctuifzdfmghit747iu7st66lo3sdjzb7avhj3ymyqg5foa/hdplay.m3u8?SD

Beware however that the actual IP address changes all the time. With a browser I can download the m3u8 with no problems, but yt-dl cannot find it. It seems to ignore the fact that the URL needs to be found at port 8080 and not the default http-port. Seems like a pretty basic thing...

obfusk commented 4 years ago

I suspect that the problem isn't with the m3u3 port but that the browser is sending a referer header whereas youtube-dl isn't. Try running youtube-dl with

--referer "http://driveproxy.net/drive/MlA3M2xCUmNSU3RlQWoyYW1HMllYQT09.html"