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

videoId is not present for the top result #227

Closed
MrCyjaneK opened this issue Sep 22, 2021 · 0 comments
Closed

videoId is not present for the top result #227

MrCyjaneK opened this issue Sep 22, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@MrCyjaneK
Copy link

This is my code ytmusicsearch.py:

#!/usr/bin/env python3
from ytmusicapi import YTMusic
import json
import sys

ytmusic = YTMusic('headers_auth.json')
search_results = ytmusic.search(sys.argv[1])
print(json.dumps(search_results[0]))

I execute it like this: ./ytmusicsearch.py "eminem - we made you" | jq

But all I get in response is:

{
  "resultType": "top resul",
  "title": "We Made You",
  "thumbnails": [
    {
      "url": "https://lh3.googleusercontent.com/IA6sdmqe3uXwtYgNNbi8WDD6LmFcsSRccmHErKlNWh-WvWoyIHcnLrmVlPbdLMT5SDqo2DRHjUbQLU9m=w60-h60-l90-rj",
      "width": 60,
      "height": 60
    },
    {
      "url": "https://lh3.googleusercontent.com/IA6sdmqe3uXwtYgNNbi8WDD6LmFcsSRccmHErKlNWh-WvWoyIHcnLrmVlPbdLMT5SDqo2DRHjUbQLU9m=w120-h120-l90-rj",
      "width": 120,
      "height": 120
    }
  ]
}

There is no videoId in the first result. For other search_results the videoId is present, it is missing only from the top result

@sigma67 sigma67 added the bug Something isn't working label Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants