get_home: fix song artist parsing (#798)
* get_home: fix song artist parsing extra text is now excluded from `artists`: - `get_home`/`get_song_related`: play counts in certain track carousels - `get_home`: "Song" specifiers for audio tracks `get_explore` song charts are also no longer missing `album` data * skip type specifiers in parse_song_runs without comparing text
This commit is contained in:
parent
0b7daa4959
commit
e738b2a70f
12 changed files with 118 additions and 68 deletions
|
|
@ -142,6 +142,16 @@ class TestSearch:
|
|||
"name": "Stanford GSB Podcasts",
|
||||
}
|
||||
|
||||
def test_search_top_result_video(self, yt):
|
||||
results = yt.search("Fuel Eminem")
|
||||
assert results[0]["category"] == "Top result"
|
||||
assert results[0]["resultType"] == "video"
|
||||
assert results[0]["videoId"] == "t5H_CewqpKA"
|
||||
assert results[0]["artists"] == [
|
||||
{"name": "Eminem", "id": "UCedvOgsKFzcK3hA5taf3KoQ"},
|
||||
{"name": "JID", "id": "UCRlGNubLJBgW9VRCuiUnuYw"},
|
||||
]
|
||||
|
||||
def test_search_uploads(self, config, yt, yt_oauth):
|
||||
with pytest.raises(Exception, match="No filter can be set when searching uploads"):
|
||||
yt.search(
|
||||
|
|
|
|||
Loading…
Reference in a new issue