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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[extractor/youtube] Extract title in YouTube Music search results #7102

Merged
merged 1 commit into from May 22, 2023

Conversation

kangalio
Copy link
Contributor

@kangalio kangalio commented May 22, 2023

IMPORTANT: PRs without the template will be CLOSED

Description of your pull request and other information

This PR extracts the video title of YouTube Music search results and returns them as a new title field in the output.

Fixes #7095

Template

Before submitting a pull request make sure you have:

In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under Unlicense. Check all of the following options that apply:

  • 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?

  • Fix or improvement to an extractor (Make sure to add/update tests)
    • I did not update tests because I was unsure how. Grepping for musicResponsiveListItemRenderer didn't turn up anything so at first I assumed that entire renderer extractor was untested, but while writing I realize the tests query the YouTube API in real-time? Looking at YoutubeMusicSearchURLIE._TESTS, is url the URL to be queried and info_dict the expected extracted value?
  • New extractor (Piracy websites will not be accepted)
  • Core bug fix/improvement
  • New feature (It is strongly recommended to open an issue first)
Copilot Summary

馃 Generated by Copilot at 73830e1

Summary

馃幍馃洜锔忦煆凤笍

Add video titles to YouTube Music tab urls. Fix missing titles for some music videos by extracting them from the renderer object in yt_dlp/extractor/youtube.py.

_music_responsive_list_entry
Adds video title to url
Fixing a bug in autumn

Walkthrough

  • Add video title to url result in YouTube Music tab extractor (link)

@kangalio kangalio changed the title Extract title in YouTube Music search results [extractor/youtube] Extract title in YouTube Music search results May 22, 2023
@pukkandan
Copy link
Member

  • _Looking at YoutubeMusicSearchURLIE._TESTS, is url the URL to be queried and info_dict the expected extracted value?

Yes, but we have no mechanism to test the intermediate url_result. So don't worry about it.

@pukkandan pukkandan merged commit 69a40e4 into yt-dlp:master May 22, 2023
11 checks passed
stanoarn pushed a commit to stanoarn/yt-dlp that referenced this pull request May 26, 2023
aalsuwaidi pushed a commit to aalsuwaidi/yt-dlp that referenced this pull request Apr 21, 2024
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.

YouTube Music search doesn't extract titles
2 participants