403 Forbidden on Ubuntu but not Windows #15914

Closed
opened 2026-02-21 07:20:25 -05:00 by deekerman · 1 comment
Owner

Originally created by @ChuchPewPewPew on GitHub (Feb 9, 2019).

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 2019.02.08. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

  • [x ] I've verified and I assure that I'm running youtube-dl 2019.02.08

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?

  • 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)
  • [x ] Question
  • Other

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

If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

Add the -v flag to your command line you run youtube-dl with (youtube-dl -v <your command line>), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

`root@Test42069:# youtube-dl -v --no-part --hls-use-mpegts --referer "http://123tv.live/watch/ae/" "http://e3.matkhau.net/live/ae/chunks.m3u8" -o /var/html/www/testing.flv
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'--no-part', u'--hls-use-mpegts', u'--referer', u'http://123tv.live/watch/ae/', u'http://e3.matkhau.net/live/ae/chunks.m3u8', u'-o', u'/var/html/www/testing.flv']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.02.08
[debug] Python version 2.7.15rc1 (CPython) - Linux-4.15.0-36-generic-x86_64-with-Ubuntu-18.04-bionic
[debug] exe versions: ffmpeg 4.1
[debug] Proxy map: {}
[generic] chunks: Requesting header
[generic] chunks: Downloading m3u8 information
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on u'http://e3.matkhau.net/live/ae/chunks.m3u8'
[download] Destination: /var/html/www/testing.flv
[debug] ffmpeg command line: ffmpeg -y -loglevel verbose -headers 'Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Referer: http://123tv.live/watch/ae/
Cookie: ___utmvmKFucYSkB=tWTUzUBSJVa; ___utmvaKFucYSkB=DJFjgjr; ___utmvbKFucYSkB=EZh
XHaOTalV: Kty; visid_incap_1957122=GZp58T/FRwar961WxQdUYsHvXlwAAAAAQUIPAAAAAAAACtwAmkjekQe89l8mYaU2; incap_ses_148_1957122=aM+WYFT7pG8G0uPy1dANAsHvXlwAAAAA2fWWl2Ov3/bo7/OT+scamA==
' -i 'http://e3.matkhau.net/live/ae/chunks.m3u8' -c copy -f mpegts 'file:/var/html/www/testing.flv'
Error: unable to open display
ffmpeg version n4.1 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu116.04.10) 20160609
configuration: --prefix= --prefix=/usr --disable-debug --disable-doc --disable-static --enable-avisynth --enable-cuda --enable-cuvid --enable-libdrm --enable-ffplay --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfontconfig --enable-libfreetype --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopus --enable-libpulse --enable-sdl2 --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libv4l2 --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxvid --enable-nonfree --enable-nvenc --enable-omx --enable-openal --enable-opencl --enable-runtime-cpudetect --enable-shared --enable-vaapi --enable-vdpau --enable-version3 --enable-xlib
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
[tcp @ 0x2088440] Starting connection attempt to 107.154.156.237 port 80
[tcp @ 0x2088440] Successfully connected to 107.154.156.237 port 80
[http @ 0x2086480] HTTP error 403 Forbidden
http://e3.matkhau.net/live/ae/chunks.m3u8: Server returned 403 Forbidden (access denied)

ERROR: ffmpeg exited with code 1
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/local/bin/youtube-dl/main.py", line 19, in
youtube_dl.main()
File "/usr/local/bin/youtube-dl/youtube_dl/init.py", line 472, in main
_real_main(argv)
File "/usr/local/bin/youtube-dl/youtube_dl/init.py", line 462, in _real_main
retcode = ydl.download(all_urls)
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2006, in download
url, force_generic_extractor=self.params.get('force_generic_extractor', False))
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 805, in extract_info
return self.process_ie_result(ie_result, download, extra_info)
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 859, in process_ie_result
return self.process_video_result(ie_result, download=download)
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1640, in process_video_result
self.process_info(new_info)
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1913, in process_info
success = dl(filename, info_dict)
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1852, in dl
return fd.download(name, info)
File "/usr/local/bin/youtube-dl/youtube_dl/downloader/common.py", line 364, in download
return self.real_download(filename, info_dict)
File "/usr/local/bin/youtube-dl/youtube_dl/downloader/external.py", line 64, in real_download
self.get_basename(), retval))
File "/usr/local/bin/youtube-dl/youtube_dl/downloader/common.py", line 165, in report_error
self.ydl.report_error(*args, **kargs)
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 622, in report_error
self.trouble(error_message, tb)
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 584, in trouble
tb_data = traceback.format_list(traceback.extract_stack())`
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKcj']
[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
[debug] youtube-dl version 2019.02.08
[debug] Python version 2.7.11 - Windows-2003Server-5.2.3790-SP2
[debug] exe versions: ffmpeg N-75573-g1d0487f, ffprobe N-75573-g1d0487f, rtmpdump 2.4
[debug] Proxy map: {}
...


---

### If the purpose of this *issue* is a *site support request* please provide all kinds of example URLs support for which should be included (replace following example URLs by **yours**):
- Single video: https://www.youtube.com/watch?v=BaW_jenozKc
- Single video: https://youtu.be/BaW_jenozKc
- Playlist: https://www.youtube.com/playlist?list=PL4lCao7KL_QFVb7Iudeipvc2BCavECqzc

Note that **youtube-dl does not support sites dedicated to [copyright infringement](https://github.com/rg3/youtube-dl#can-you-add-support-for-this-anime-video-site-or-site-which-shows-current-movies-for-free)**. In order for site support request to be accepted all provided example URLs should not violate any copyrights.

---

### Description of your *issue*, suggested solution and other information

Trying to save this hls file using Ubuntu and I get a 403 forbidden, although the file opens initially.  Using windows however, the command works as expected.

Not sure if this is a glitch or I am doing something wrong.

Thank you for looking.
Originally created by @ChuchPewPewPew on GitHub (Feb 9, 2019). ## 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 _2019.02.08_. If it's not, read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected. * [x ] I've **verified** and **I assure** that I'm running youtube-dl **2019.02.08** ### Before submitting an _issue_ make sure you have: * [ x] At least skimmed through the [README](https://github.com/rg3/youtube-dl/blob/master/README.md), **most notably** the [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections * [x ] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) 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_? * [ ] 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) * [x ] Question * [ ] Other ### The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your _issue_ ### If the purpose of this _issue_ is a _bug report_, _site support request_ or you are not completely sure provide the full verbose output as follows: Add the `-v` flag to **your command line** you run youtube-dl with (`youtube-dl -v <your command line>`), copy the **whole** output and insert it here. It should look similar to one below (replace it with **your** log inserted between triple ```): `root@Test42069:# youtube-dl -v --no-part --hls-use-mpegts --referer "http://123tv.live/watch/ae/" "http://e3.matkhau.net/live/ae/chunks.m3u8" -o /var/html/www/testing.flv [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: [u'-v', u'--no-part', u'--hls-use-mpegts', u'--referer', u'http://123tv.live/watch/ae/', u'http://e3.matkhau.net/live/ae/chunks.m3u8', u'-o', u'/var/html/www/testing.flv'] [debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2019.02.08 [debug] Python version 2.7.15rc1 (CPython) - Linux-4.15.0-36-generic-x86_64-with-Ubuntu-18.04-bionic [debug] exe versions: ffmpeg 4.1 [debug] Proxy map: {} [generic] chunks: Requesting header [generic] chunks: Downloading m3u8 information [debug] Default format spec: bestvideo+bestaudio/best [debug] Invoking downloader on u'http://e3.matkhau.net/live/ae/chunks.m3u8' [download] Destination: /var/html/www/testing.flv [debug] ffmpeg command line: ffmpeg -y -loglevel verbose -headers 'Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip, deflate Accept: text/html,application/xhtml+xml,application/xml;q=0.9,_/_;q=0.8 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Referer: http://123tv.live/watch/ae/ Cookie: ___utmvmKFucYSkB=tWTUzUBSJVa; ___utmvaKFucYSkB=DJFjgjr; ___utmvbKFucYSkB=EZh XHaOTalV: Kty; visid_incap_1957122=GZp58T/FRwar961WxQdUYsHvXlwAAAAAQUIPAAAAAAAACtwAmkjekQe89l8mYaU2; incap_ses_148_1957122=aM+WYFT7pG8G0uPy1dANAsHvXlwAAAAA2fWWl2Ov3/bo7/OT+scamA== ' -i 'http://e3.matkhau.net/live/ae/chunks.m3u8' -c copy -f mpegts 'file:/var/html/www/testing.flv' Error: unable to open display ffmpeg version n4.1 Copyright (c) 2000-2018 the FFmpeg developers built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu116.04.10) 20160609 configuration: --prefix= --prefix=/usr --disable-debug --disable-doc --disable-static --enable-avisynth --enable-cuda --enable-cuvid --enable-libdrm --enable-ffplay --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfontconfig --enable-libfreetype --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopus --enable-libpulse --enable-sdl2 --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libv4l2 --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxvid --enable-nonfree --enable-nvenc --enable-omx --enable-openal --enable-opencl --enable-runtime-cpudetect --enable-shared --enable-vaapi --enable-vdpau --enable-version3 --enable-xlib libavutil 56. 22.100 / 56. 22.100 libavcodec 58. 35.100 / 58. 35.100 libavformat 58. 20.100 / 58. 20.100 libavdevice 58. 5.100 / 58. 5.100 libavfilter 7. 40.101 / 7. 40.101 libswscale 5. 3.100 / 5. 3.100 libswresample 3. 3.100 / 3. 3.100 libpostproc 55. 3.100 / 55. 3.100 [tcp @ 0x2088440] Starting connection attempt to 107.154.156.237 port 80 [tcp @ 0x2088440] Successfully connected to 107.154.156.237 port 80 [http @ 0x2086480] HTTP error 403 Forbidden http://e3.matkhau.net/live/ae/chunks.m3u8: Server returned 403 Forbidden (access denied) ERROR: ffmpeg exited with code 1 File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main "**main**", fname, loader, pkg_name) File "/usr/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/usr/local/bin/youtube-dl/**main**.py", line 19, in youtube_dl.main() File "/usr/local/bin/youtube-dl/youtube_dl/**init**.py", line 472, in main _real_main(argv) File "/usr/local/bin/youtube-dl/youtube_dl/**init**.py", line 462, in _real_main retcode = ydl.download(all_urls) File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2006, in download url, force_generic_extractor=self.params.get('force_generic_extractor', False)) File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 805, in extract_info return self.process_ie_result(ie_result, download, extra_info) File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 859, in process_ie_result return self.process_video_result(ie_result, download=download) File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1640, in process_video_result self.process_info(new_info) File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1913, in process_info success = dl(filename, info_dict) File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1852, in dl return fd.download(name, info) File "/usr/local/bin/youtube-dl/youtube_dl/downloader/common.py", line 364, in download return self.real_download(filename, info_dict) File "/usr/local/bin/youtube-dl/youtube_dl/downloader/external.py", line 64, in real_download self.get_basename(), retval)) File "/usr/local/bin/youtube-dl/youtube_dl/downloader/common.py", line 165, in report_error self.ydl.report_error(*args, **kargs) File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 622, in report_error self.trouble(error_message, tb) File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 584, in trouble tb_data = traceback.format_list(traceback.extract_stack())` [debug] System config: [] [debug] User config: [] [debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKcj'] [debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251 [debug] youtube-dl version 2019.02.08 [debug] Python version 2.7.11 - Windows-2003Server-5.2.3790-SP2 [debug] exe versions: ffmpeg N-75573-g1d0487f, ffprobe N-75573-g1d0487f, rtmpdump 2.4 [debug] Proxy map: {} ... ``` --- ### If the purpose of this *issue* is a *site support request* please provide all kinds of example URLs support for which should be included (replace following example URLs by **yours**): - Single video: https://www.youtube.com/watch?v=BaW_jenozKc - Single video: https://youtu.be/BaW_jenozKc - Playlist: https://www.youtube.com/playlist?list=PL4lCao7KL_QFVb7Iudeipvc2BCavECqzc Note that **youtube-dl does not support sites dedicated to [copyright infringement](https://github.com/rg3/youtube-dl#can-you-add-support-for-this-anime-video-site-or-site-which-shows-current-movies-for-free)**. In order for site support request to be accepted all provided example URLs should not violate any copyrights. --- ### Description of your *issue*, suggested solution and other information Trying to save this hls file using Ubuntu and I get a 403 forbidden, although the file opens initially. Using windows however, the command works as expected. Not sure if this is a glitch or I am doing something wrong. Thank you for looking. ```
Author
Owner

@dstftw commented on GitHub (Feb 9, 2019):

403 on Windows for me.

@dstftw commented on GitHub (Feb 9, 2019): 403 on Windows for me.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl#15914
No description provided.