mirror of
https://github.com/sigma67/ytmusicapi.git
synced 2026-04-25 07:16:00 +03:00
[GH-ISSUE #149] Views and duration are incorrectly parsed when searching for a video. #112
Labels
No labels
a/b
bug
documentation
enhancement
good first issue
help wanted
invalid
pull-request
question
wontfix
yt-error
yt-update
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ytmusicapi#112
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bee395 on GitHub (Jan 11, 2021).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/149
Environment
**System OS: Linux
**Python Version: 3.9.1
installed from master:
cb1f58d696Steps to Reproduce
print(results)
When I get the details of the video through youtube.get_song('wXrZOFRikOY') it correctly returns '... viewCount': '6707', 'author': 'Julie Dowd', ...
Output
Other information
The problem is probably that the video is a "premiere" video
It looks like the get_item_text on parsers/browsing.py:74 takes the wrong columns
@sigma67 commented on GitHub (Jan 12, 2021):
Unfortunately I cannot reproduce this. Can you show a screenshot of the Web UI where this song is different from the others? Was it a time-limited thing, since you mentioned premiere?
@bee395 commented on GitHub (Jan 12, 2021):
I think that a premiere video is a planned video with a countdown and a livechat, during the video
After the premiere ended, there shouldn't be anything special about the video
Screenshot of the video (it's in Dutch, but it should also show in other languages):

Link to the video: https://www.youtube.com/watch?v=wXrZOFRikOY
@sigma67 commented on GitHub (Jan 12, 2021):
Sorry if I wasn't clear, I meant the YouTube Music search page, not actual YouTube page. I found the title you mentioned now, it seems to be missing duration, which is unusual.
@bee395 commented on GitHub (Jan 12, 2021):
Ah sorry, my bad. I wasn't aware that Youtube Music has a different Web interface.
@bee395 commented on GitHub (Jan 14, 2021):
Today, after I pulled the newest version from master, I tried some new songs, and now I the view count is incorrectly parsed for another song
youtube.search('Young Franco - Miss You', filter='videos')returns a result containing:youtube.get_song('4mUJaWqWb_k')returns the output with the correct amount of views and duration.The song on Youtube Music: https://music.youtube.com/watch?v=4mUJaWqWb_k&list=RDAMVM4mUJaWqWb_k
@sigma67 commented on GitHub (Jan 14, 2021):
Apologies, I didn't consider the multiple artist case. I have tested both search terms you mentioned locally. Can you retry with latest master and some different search terms?
@bee395 commented on GitHub (Jan 14, 2021):
Thanks for your incredible fast responses. That song is now working. But unfortunately I found another song that doesn't work properly:
Namely when I search for
Alec Benjamin - Stan - Recorded at Spotify Studios NYC:YT Music link: https://music.youtube.com/watch?v=nFQ4kGbIJa0&list=RDAMVMnFQ4kGbIJa0
@sigma67 commented on GitHub (Jan 14, 2021):
Ah yes, the tricky edge case where no artists have IDs. Already fixed it for song search, should have seen it coming. I also considered the case with no artist IDs and no duration, even thought I haven't seen it yet. I hope we've covered it all now.
@bee395 commented on GitHub (Jan 14, 2021):
When I now search for a song with no song duration found, it returns
None. So that looks goodI think that was everything. Thanks for your help 👍