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

YouTube content_html error #17231

Open
rshadow opened this issue Aug 13, 2018 · 7 comments
Open

YouTube content_html error #17231

rshadow opened this issue Aug 13, 2018 · 7 comments

Comments

@rshadow
Copy link

@rshadow rshadow commented Aug 13, 2018

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

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones
  • 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)
  • 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 ```):

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--verbose', '--no-overwrites', '--no-progress', '--download-archive=/home/rubin/bin/youtube-dl.archive.txt', '--ignore-errors', '--rate-limit=512k', '--retries=1', '--buffer-size=16K', '--continue', '--prefer-free-formats', '--merge-output-format=mkv', '--add-metadata', '--output=/srv/media/music/Monstercat Release/Dubstep/%(title)s.%(ext)s', '--extract-audio', '--audio-format=mp3', '--no-post-overwrites', '--audio-quality=0', 'https://www.youtube.com/playlist?list=PLF5C76212C58C464A']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.05.18.1
[debug] Python version 3.5.3 - Linux-4.9.0-4-amd64-x86_64-with-debian-9.5
[debug] exe versions: ffmpeg 2.6.4, ffprobe 2.6.4
[debug] Proxy map: {}
[youtube:playlist] PLF5C76212C58C464A: Downloading webpage
[download] Downloading playlist: Dubstep
[youtube:playlist] PLF5C76212C58C464A: Downloading page #1
ERROR: 'content_html'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/youtube_dl/YoutubeDL.py", line 771, in extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/usr/lib/python3/dist-packages/youtube_dl/YoutubeDL.py", line 923, in process_ie_result
    ie_entries, playliststart, playlistend))
  File "/usr/lib/python3/dist-packages/youtube_dl/extractor/youtube.py", line 272, in _entries
    content_html = more['content_html']
KeyError: 'content_html'

Description of your issue, suggested solution and other information

Error while downloading playlist https://www.youtube.com/playlist?list=PLF5C76212C58C464A

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 13, 2018

Post the output with --dump-pages.

@dstftw dstftw closed this Aug 13, 2018
@rshadow
Copy link
Author

@rshadow rshadow commented Aug 13, 2018

@rshadow
Copy link
Author

@rshadow rshadow commented Aug 13, 2018

Reopen pls

@dstftw dstftw reopened this Aug 14, 2018
@Elijas
Copy link

@Elijas Elijas commented Jun 17, 2020

What worked for someone with this bug (version 2020.06.06) was to create a duplicate playlist with all of the original playlist videos inside, and then run the app on the new playlist

If it doesn't work, try checking the other ~12 closed issues, probably all are about the same bug (found with search query content_html), maybe there will be more solutions

@amcgregor
Copy link

@amcgregor amcgregor commented Jun 27, 2020

Please see this ongoing official support thread. Google have, apparently, rolled out an update a few weeks back that proactively searches for advertisement blocking techniques, and seem to have implemented it in the ("safe" from a security perspective) assume everyone is guilty, only innocent if we can prove the ad is visible, approach. Thus automated clients not executing JavaScript will fail that check by default. My response has details about my setup, and some of the testing I have attempted, which has only solidified it as being AdBlock in-browser, and failure to execute JS in YouTube-DL's case.

Edited to add: I mentioned in that comment an average run takes ~20 minutes, thus at my level of parallelization, around 7 minutes per channel. Last run took three minutes flat, literally found no videos. (There was more overhead in parallelizing it than in actual processing of data!)

Edited again to add: here's an earlier version of the "shell script" I'm using — only major changes are a narrower acceptable date range (one week, since I tend to run this once or twice a day), and possibly a tweaked format selection? Plus my complete channel list is included in my local copy, of course. Noting that my fork was behind (multiple remotes is a PITA to manage!) I updated it and re-ran, which appears to have largely resolved the problem. Le sigh! b0fc20aeeb551733d1ceb665e59c00f4b6879636 and d0e5734dafe5e35125cceb68921bfc604837f95c (from my fork, interesting that the commits still link properly here…) being the two "patches" I applied to reduce the likelihood of hitting rate limits by exiting early. No need to query and issue an HTTP request for every single video after the first one rejected due to age, for example, as in every case I've tested, they're only older after that point. Refreshing already up-to-date local copies, no need to request anything other than the first page, &c. (I'd like to clean these up and give them proper command line switches—and implement an archive.ids feature but for skipped videos to avoid excessive unnecessary HTTP requests in general—but I just haven't had the time given the "current situation" in meat-space.)

@myt00seven
Copy link

@myt00seven myt00seven commented Jul 3, 2020

Just try to upgrade to the latest version 2020.06.16.1. That solved my issue.

@a-y-u-s-h
Copy link

@a-y-u-s-h a-y-u-s-h commented Sep 29, 2020

sudo youtube-dl -U works for me.

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
6 participants
You can’t perform that action at this time.