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] Fix empty description extraction #26575

Merged
merged 1 commit into from
Sep 13, 2020
Merged

[youtube] Fix empty description extraction #26575

merged 1 commit into from
Sep 13, 2020

Conversation

dpeukert
Copy link
Contributor

@dpeukert dpeukert commented Sep 12, 2020

Please follow the guide below

  • You will be asked some questions, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your pull request (like that [x])
  • Use Preview tab to see how your pull request will actually look like

Before submitting a pull request make sure you have:

In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:

  • I am the original author of this code and I am willing to release it under Unlicense
  • I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

  • Bug fix
  • Improvement
  • New extractor
  • New feature

Description of your pull request and other information

In its current state, the YouTube description extraction logic only checks if shortDescription from video_details is truthy, which it is not if it's an empty string when there is no description. As a result of that, it uses the description meta tag, which has a default value of Enjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube.. This PR changes this behaviour to only use the meta tag if shortDescription is None (= doesn't exist) and adds a test for it.

@0x9fff00
Copy link
Contributor

Fixes #26006

@dstftw dstftw force-pushed the master branch 2 times, most recently from 5e26784 to da2069f Compare September 13, 2020 13:49
@dstftw dstftw merged commit ea74e00 into ytdl-org:master Sep 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants