Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PBS HTTP Error 403 "Could not send HEAD request" #12227

Closed
blucht opened this issue Feb 23, 2017 · 5 comments
Closed

PBS HTTP Error 403 "Could not send HEAD request" #12227

blucht opened this issue Feb 23, 2017 · 5 comments
Labels

Comments

@blucht
Copy link

@blucht blucht commented Feb 23, 2017

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 that [x])
  • Use Preview tab to see how your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2017.02.22. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2017.02.22

Before submitting an issue make sure you have:

  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

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

Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.


D:\Program Files\YTDL>dir
 Volume in drive D has no label.
 Volume Serial Number is 7E48-8343

 Directory of D:\Program Files\YTDL

02/22/2017  09:30 PM    <DIR>          .
02/22/2017  09:30 PM    <DIR>          ..
02/22/2017  09:21 PM    <DIR>          youtube-dl
02/22/2017  09:29 PM         7,660,741 youtube-dl.exe
               1 File(s)      7,660,741 bytes
               3 Dir(s)  77,378,781,184 bytes free


D:\Program Files\YTDL>youtube-dl -v "http://ga.video.cdn.pbs.org/videos/independ
ent-lens/7a202f35-4463-4337-8c10-528f82920e4f/277803/hd-1080p-mezzanine-16x9/077
2d107_bad-kids-30-promo-mezzanine-16x9-mp4-192-800k.mp4" -o pbs.mp4
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'http://ga.video.cdn.pbs.org/videos/independen
t-lens/7a202f35-4463-4337-8c10-528f82920e4f/277803/hd-1080p-mezzanine-16x9/0772d
107_bad-kids-30-promo-mezzanine-16x9-mp4-192-800k.mp4', '-o', 'pbs.mp4']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2017.02.22
[debug] Python version 3.4.4 - Windows-Vista-6.0.6002-SP2
[debug] exe versions: none
[debug] Proxy map: {}
[generic] 0772d107_bad-kids-30-promo-mezzanine-16x9-mp4-192-800k: Requesting header
WARNING: Could not send HEAD request to http://ga.video.cdn.pbs.org/videos/indep
endent-lens/7a202f35-4463-4337-8c10-528f82920e4f/277803/hd-1080p-mezzanine-16x9/
0772d107_bad-kids-30-promo-mezzanine-16x9-mp4-192-800k.mp4: HTTP Error 403: Forbidden
[generic] 0772d107_bad-kids-30-promo-mezzanine-16x9-mp4-192-800k: 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\rg3\tmpkf42q19b\build\youtube_dl\extractor\common.py", line 496, in _request_webpage
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkf42q19b\build\youtube_dl\YoutubeDL.py", line 2036, 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


D:\Program Files\YTDL>
...
<end of log>

Description of your issue, suggested solution and other information

I am a new user, having followed the instructions to download a video from PBS in the following youtube video: https://www.youtube.com/watch?v=qeqL8TfTwy0

Unfortunately, I receive an error message,: HTTP Error 403: Forbidden. This is proceeded by the Warning: Could not send HEAD request. I searched Issues and found one closed with an identical warning, but in that case the user was able to download some files but not others.

#10968

The video I am attempting to download is a 30-second preview.; I thought it would be a good test case.
I also tried downloading a different file, over 5 minutes in length, but get the exact same error message.

http://www.pbs.org/video/2365953667/

Please let me know if there is any additional information I can provide.

@starchivore
Copy link

@starchivore starchivore commented Feb 23, 2017

youtube-dl --geo-bypass-country US "http://www.pbs.org/video/2365928080/" worked for me:

D:\ytdl>youtube-dl --geo-bypass-country US "http://www.pbs.org/video/2365928080/"
[pbs] Downloading JSON metadata
[pbs] 2365928080: Downloading widget/partnerplayer page
[pbs] 2365928080: Downloading portalplayer page
[pbs] 2365928080: Downloading hls-1080p-16x9 video url info
[pbs] 2365928080: Downloading m3u8 information
[pbs] 2365928080: Downloading mp4-baseline-16x9 video url info
[pbs] 2365928080: Downloading hls-800k-16x9 video url info
[pbs] 2365928080: Downloading m3u8 information
[pbs] 2365928080: Checking http-1200k video URL
[pbs] 2365928080: Checking http-6500k video URL
[pbs] 2365928080: Checking http-4500k video URL
[pbs] 2365928080: Checking http-2500k video URL
[pbs] 2365928080: Checking http-800k video URL
[pbs] 2365928080: Checking http-400k video URL
[download] Destination: Independent Lens - The Bad Kids - Trailer-2365928080.mp4

[download] 12.0% of 23.22MiB at 373.11KiB/s ETA 00:56

@remitamine
Copy link
Collaborator

@remitamine remitamine commented Feb 23, 2017

again you don't have to look for the m3u8 link in developer tools and modify it to an mp4 link, it's all done automatically by youtube-dl, just use the original url: http://www.pbs.org/video/2365953667/.

youtube-dl http://www.pbs.org/video/2365953667/
[pbs] Downloading JSON metadata
[pbs] 2365953667: Downloading widget/partnerplayer page
[pbs] 2365953667: Downloading portalplayer page
[pbs] 2365953667: Downloading hls-1080p-16x9 video url info
[pbs] 2365953667: Downloading m3u8 information
[pbs] 2365953667: Downloading mp4-baseline-16x9 video url info
[pbs] 2365953667: Downloading hls-800k-16x9 video url info
[pbs] 2365953667: Downloading m3u8 information
[pbs] 2365953667: Checking http-1200k video URL
[pbs] 2365953667: Checking http-6500k video URL
[pbs] 2365953667: Checking http-4500k video URL
[pbs] 2365953667: Checking http-2500k video URL
[pbs] 2365953667: Checking http-800k video URL
[pbs] 2365953667: Checking http-400k video URL
WARNING: ar subtitles not available for 2365953667
[info] Writing video subtitles to: Independent Lens - TOWER - Guns on Campus - Short Film-2365953667.en.vtt
[download] Destination: Independent Lens - TOWER - Guns on Campus - Short Film-2365953667.mp4

02/23 07:20:30 [NOTICE] Downloading 1 item(s)
[#e02bb8 97MiB/98MiB(99%) CN:1 DL:282KiB]                                      
02/23 07:25:05 [NOTICE] Download complete: /home/amine/Videos/Independent Lens - TOWER - Guns on Campus - Short Film-2365953667.mp4.part

Download Results:
gid   |stat|avg speed  |path/URI
======+====+===========+=======================================================
e02bb8|OK  |   366KiB/s|/home/amine/Videos/Independent Lens - TOWER - Guns on Campus - Short Film-2365953667.mp4.part

Status Legend:
(OK):download completed.
[aria2c] Downloaded 102788511 bytes
[download] 100% of 98.03MiB
@remitamine remitamine closed this Feb 23, 2017
@remitamine
Copy link
Collaborator

@remitamine remitamine commented Feb 23, 2017

@starchivore --geo-bypass-country US is not needed for pbs.

@dstftw dstftw added the invalid label Feb 23, 2017
@blucht
Copy link
Author

@blucht blucht commented Feb 23, 2017

The YouTube tutorial states that m3u8 must be replaced. It also states that the field after 16x9 must also be replaced. This is in addition to the fact that the video URL must be captured (not the web page URL).

I get the sense from your reply that these instructions are no longer valid.

I will try your suggestion to use the web page URL and NOT modify anything.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Feb 23, 2017

There are no official youtube-dl tutorials on YouTube. For all such tutorials ask their authors not us.

@ytdl-org ytdl-org locked and limited conversation to collaborators Feb 23, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.