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

Remove offset + fix top result #517

Merged
merged 4 commits into from
Jan 14, 2024
Merged

Conversation

AustinGitHub
Copy link
Contributor

@AustinGitHub AustinGitHub commented Jan 13, 2024

Issue - #518
These offsets cause an issue

Fix, I test this way
image

Before
BeforeChange.txt

After
AfterChanges.txt

Differences
image

Only issue is this

image

But this is because code forced in to append None for artist without Id but then again, what if an artist name is "Album" can't just filter that out by keyword. I think this append of None should be taken out because with the way youtube music and youtube topic channels are auto-created I think it is safe to say most artists would have an id, no?

Let me know and I can commit that change, thanks!

Remove offset + fix top result
@AustinGitHub
Copy link
Contributor Author

Tried to run the pyTests but it's very complicated. The oauth works fine, but the browser one just says paste the request headers from firefox and press enter, but what request headers? I am confused on that part.

Also, can't you write a new script to run both of those functions and then move the file as well? Would make it a lot easier.

add Null checks
@jcbirdwell
Copy link
Contributor

but what request headers?

Request headers come from a post request to a user specific endpoint. So with your network monitor open navigate from something like home -> library and use the post request associated with it.

Copy link
Owner

@sigma67 sigma67 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution, see comments.

I suggest we discuss the setup issue over in #520. I think we could improve CONTRIBUTING.md and I'm open towards a script if it's feasible. Could probably also simplify the test.cfg a bit.

Request headers are documented here: https://ytmusicapi.readthedocs.io/en/stable/setup/browser.html

But I can see how you'd miss that if you never bothered with the old way of doing things since we have oauth now

ytmusicapi/parsers/search.py Outdated Show resolved Hide resolved
ytmusicapi/parsers/search.py Show resolved Hide resolved
ytmusicapi/parsers/search.py Show resolved Hide resolved
@sigma67 sigma67 linked an issue Jan 14, 2024 that may be closed by this pull request
Make updates per comments
@sigma67 sigma67 merged commit 6a3924d into sigma67:main Jan 14, 2024
3 of 4 checks passed
@AustinGitHub
Copy link
Contributor Author

Thanks!

@AustinGitHub AustinGitHub deleted the fix_top_results branch January 14, 2024 18:03
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.

Search doesn't display accurate data for top result and for artists
3 participants