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

TruTV Extractor Leads To HTTP Error 403 Forbidden #11358

Closed
Saklad5 opened this issue Dec 3, 2016 · 11 comments
Closed

TruTV Extractor Leads To HTTP Error 403 Forbidden #11358

Saklad5 opened this issue Dec 3, 2016 · 11 comments

Comments

@Saklad5
Copy link

@Saklad5 Saklad5 commented Dec 3, 2016

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 2016.12.01. 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 2016.12.01

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 ```):

[debug] System config: []
[debug] User config: [u'-f', u'bestvideo[height>?2160]+bestaudio/bestvideo[ext=mp4]+bestaudio[ext=m4a]/bestvideo+bestaudio/best', u'--ffmpeg-location', u'/usr/local/bin/ffmpeg', u'--mark-watched', u'--no-playlist', u'-o', u'/Users/accountname/Library/Mobile Documents/com~apple~CloudDocs/Videos/%(title)s.%(ext)s', u'--all-subs', u'--embed-subs', u'--embed-thumbnail', u'--add-metadata', u'--recode-video', u'mp4', u'--netrc', u'--user-agent', u'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12) AppleWebKit/602.1.50 (KHTML, like Gecko) Version/10.0 Safari/602.1.50', u'--no-mtime', u'--cookies', u'/Users/accountname/.config/youtube-dl/cookies.txt', u'--convert-subs', u'ass', u'--audio-quality', u'0', u'--xattrs', u'--ap-mso=DTV', u'--ap-username=PRIVATE', u'--ap-password=PRIVATE']
[debug] Command-line args: [u'--verbose', u'http://www.trutv.com/full-episodes/adam-ruins-everything/2084668/index.html']
[debug] Encodings: locale UTF-8, fs utf-8, out None, pref UTF-8
[debug] youtube-dl version 2016.12.01
[debug] Python version 2.7.12 - Darwin-16.1.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 3.2.1, ffprobe 3.2.1, rtmpdump 2.4
[debug] Proxy map: {}
[TruTV] 2084668: Downloading webpage
[TruTV] Downloading XML
[TruTV] 2084668: Retrieving Media Token
[TruTV] 2084668: Downloading XML
[TruTV] 2084668: Downloading m3u8 information
[TruTV] 2084668: Downloading m3u8 information
[debug] Invoking downloader on u'http://androidhls-secure.cdn.turner.com/trutv/big/secure/tve/2016-11/TRUE1011091600008456_HLS/TRUE1011091600008456_Layer6_vod.m3u8'
[download] Destination: /Users/accountname/Library/Mobile Documents/com~apple~CloudDocs/Videos/Adam S1E20.mp4
[debug] ffmpeg command line: /usr/local/bin/ffmpeg -y -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 (Macintosh; Intel Mac OS X 10_12) AppleWebKit/602.1.50 (KHTML, like Gecko) Version/10.0 Safari/602.1.50
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Cookie: hdnea2=expires=1480890966~access=/trutv/big/secure/tve/2016-11/TRUE1011091600008456_HLS/*~md5=b8ac2f112f52eea9321399d8314bb1fb
' -i http://androidhls-secure.cdn.turner.com/trutv/big/secure/tve/2016-11/TRUE1011091600008456_HLS/TRUE1011091600008456_Layer6_vod.m3u8 -c copy -f mp4 -bsf:a aac_adtstoasc 'file:/Users/accountname/Library/Mobile Documents/com~apple~CloudDocs/Videos/Adam S1E20.mp4.part'
ffmpeg version 3.2.1 Copyright (c) 2000-2016 the FFmpeg developers
  built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/3.2.1 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-frei0r --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libebur128 --enable-libfontconfig --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopus --enable-librtmp --enable-librubberband --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg --enable-libzmq --enable-opencl --enable-openssl --enable-lzma --enable-libopenjpeg --disable-decoder=jpeg2000 --extra-cflags=-I/usr/local/Cellar/openjpeg/2.1.2/include/openjpeg-2.1 --enable-nonfree --enable-vda
  libavutil      55. 34.100 / 55. 34.100
  libavcodec     57. 64.101 / 57. 64.101
  libavformat    57. 56.100 / 57. 56.100
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libavresample   3.  1.  0 /  3.  1.  0
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc    54.  1.100 / 54.  1.100
[http @ 0x7fa60c505400] HTTP error 403 Forbidden
http://androidhls-secure.cdn.turner.com/trutv/big/secure/tve/2016-11/TRUE1011091600008456_HLS/TRUE1011091600008456_Layer6_vod.m3u8: Server returned 403 Forbidden (access denied)


ERROR: ffmpeg exited with code 1
  File "/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/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 <module>
    youtube_dl.main()
  File "/usr/local/bin/youtube-dl/youtube_dl/__init__.py", line 444, in main
    _real_main(argv)
  File "/usr/local/bin/youtube-dl/youtube_dl/__init__.py", line 434, in _real_main
    retcode = ydl.download(all_urls)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1791, in download
    url, force_generic_extractor=self.params.get('force_generic_extractor', False))
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 705, in extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 751, in process_ie_result
    return self.process_video_result(ie_result, download=download)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1435, in process_video_result
    self.process_info(new_info)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1699, in process_info
    success = dl(filename, info_dict)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1641, in dl
    return fd.download(name, info)
  File "/usr/local/bin/youtube-dl/youtube_dl/downloader/common.py", line 353, in download
    return self.real_download(filename, info_dict)
  File "/usr/local/bin/youtube-dl/youtube_dl/downloader/external.py", line 43, in real_download
    self.get_basename(), retval))
  File "/usr/local/bin/youtube-dl/youtube_dl/downloader/common.py", line 162, in report_error
    self.ydl.report_error(*args, **kargs)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 568, in report_error
    self.trouble(error_message, tb)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 530, in trouble
    tb_data = traceback.format_list(traceback.extract_stack())

Description of your issue, suggested solution and other information

When I try to download videos from TruTV, which authenticates using Adobe Pass, the extractor eventually tries to access a URL that returns HTTP 403. I know that my authentication is correct, as the command fails much earlier if you enter an incorrect password.

In order to use this extractor, you need credentials with a TV provider that supports TruTV. I’m using DirecTV in this case.

@remitamine
Copy link
Collaborator

@remitamine remitamine commented Dec 6, 2016

it works only using hls native downloader.
try to install pycrypto and add --hls-prefer-native to the command.

@Saklad5
Copy link
Author

@Saklad5 Saklad5 commented Dec 6, 2016

Why is pycrypto necessary? --hls-prefer-native doesn’t work any differently, but I’m not sure I have pycrypto installed either. Should I look into getting that?

@Saklad5
Copy link
Author

@Saklad5 Saklad5 commented Dec 6, 2016

Also, aren’t extractors that only work for one of the downloaders supposed to specify that and override given arguments?

@remitamine
Copy link
Collaborator

@remitamine remitamine commented Dec 6, 2016

Why is pycrypto necessary?

it's necessary to download AES-128 protected video using the hls native downloader.

@Saklad5
Copy link
Author

@Saklad5 Saklad5 commented Dec 6, 2016

I have pycrypto installed, but hlsnative keeps running into features it evidently doesn’t support and delegating to ffmpeg.

@remitamine
Copy link
Collaborator

@remitamine remitamine commented Dec 6, 2016

I have pycrypto installed, but hlsnative keeps running into features it evidently doesn’t support and delegating to ffmpeg.

your pycrypto installation wasn't detected by youtube-dl.

as a proof that it's working with native downloader:
with ffmpeg:

youtube-dl http://www.trutv.com/full-episodes/comedy-knockout/2093046/index.html
[TruTV] 2093046: Downloading webpage
[TruTV] Downloading XML
[TruTV] 2093046: Downloading XML
[TruTV] 2093046: Downloading m3u8 information
[TruTV] 2093046: Downloading m3u8 information
[download] Destination: CKO S1E11-2093046.mp4
ffmpeg version 3.2.1 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 6.2.1 (GCC) 20160830
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-avisynth --enable-avresample --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libass --enable-libbluray --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-netcdf --enable-shared --enable-version3 --enable-x11grab
  libavutil      55. 34.100 / 55. 34.100
  libavcodec     57. 64.101 / 57. 64.101
  libavformat    57. 56.100 / 57. 56.100
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libavresample   3.  1.  0 /  3.  1.  0
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc    54.  1.100 / 54.  1.100
[http @ 0x55833aaa9700] HTTP error 403 Forbidden
http://androidhls-secure.cdn.turner.com/trutv/big/secure/tve/2016-10/TRUE1010191600008384_HLS/TRUE1010191600008384_Layer6_vod.m3u8: Server returned 403 Forbidden (access denied)


ERROR: ffmpeg exited with code 1

with hls native downloader:

youtube-dl http://www.trutv.com/full-episodes/comedy-knockout/2093046/index.html
[TruTV] 2093046: Downloading webpage
[TruTV] Downloading XML
[TruTV] 2093046: Downloading XML
[TruTV] 2093046: Downloading m3u8 information
[TruTV] 2093046: Downloading m3u8 information
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 128
[download] Destination: CKO S1E11-2093046.mp4
[download]   1.0% of ~291.36MiB at 287.27KiB/s ETA 24:23
@Saklad5
Copy link
Author

@Saklad5 Saklad5 commented Dec 6, 2016

Any idea why youtube-dl may not be detecting it? I just uninstalled and reinstalled pycrypto to be sure, and it still won’t work.

@remitamine
Copy link
Collaborator

@remitamine remitamine commented Dec 6, 2016

i'm not sure what whould be the correct way to install pycrypto in Mac OS X(i'm using linux).

@Saklad5
Copy link
Author

@Saklad5 Saklad5 commented Dec 6, 2016

I’m installing it using the pip package manager, which was installed along with Python using the Homebrew package manager.

@Saklad5
Copy link
Author

@Saklad5 Saklad5 commented Dec 6, 2016

That’s pretty standard, so I don’t think it’s the issue.

@joeynotjoe
Copy link

@joeynotjoe joeynotjoe commented Jan 19, 2017

I'm just here to add that I am getting this same issue, and I installed pycrypto in the same fashion. Is there a way to find out where it thinks it is?

@remitamine remitamine closed this in 36fce54 Feb 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

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