Commit graph ytmusicapi/tests/mixins/test_browsing.py
Author SHA1 Message Date
Solomon
e738b2a70f
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
2025-08-23 19:21:54 +02:00
Solomon
7f42e8d5f0
get_album: distinguish between "other versions" and "releases for you" (#791)
* parse_album: return audioPlaylistId for Premium users

`audioPlaylistId` is no longer `None` when `parse_album` is called with
data from a Premium account

* get_album: distinguish between "other versions" and "releases for you"

adds `related_recommendations`, a list of albums in "Releases for you"

`other_versions` no longer contains those recommendations when its
carousel is positioned after "Releases for you"
2025-07-29 22:35:21 +02:00
Solomon
39a480eace
prevent KeyError when parsing missing author data (#788)
`get_album` no longer errors on albums with no artist metadata, instead
returning `"artist": None`

Co-authored-by: sigma67 <sigma67.github@gmail.com>
2025-07-24 21:31:49 +02:00
sigma67
4506c7eb12 get_episode: fixed a crash for podcasts with missing description 2025-07-24 21:22:22 +02:00
Solomon Victorino
3f27d9bd07 update a couple tests
- replace deleted albums
- `MPREb_TPH4WqN5pUo`'s unavailable tracks are now in the tracklist
- handle podcast episodes in video results
2025-07-24 20:43:41 +02:00
sigma67
a979691bb0
>=3.10 strict typing (#765)
* >=3.10 

* fully typed (mypy strict mode enabled)

* fix tests (get_tasteprofile now requires auth - serverside)

* update linters

* fix uploads search
2025-04-17 16:05:34 +02:00
sigma67
452b5cdf6e
fix #713: get_artist radioId and shuffleId missing (#714)
* fix #713: get_artist radioId and shuffleId missing

* format
2025-01-08 08:48:07 +01:00
sigma67
b86654fbaf
Added Lyrics w. Timestamps #662 (#693)
* Added Lyrics w. Timestamps

Added `get_lyrics_with_timestamps` to get lyrics with timestamps.
The Method doesn't try to parse the response as normal lyrics, if no lyrics with timestamps are returned. (could be changed to do so tho, the format is the same)

* Update browsing.py

* Combined both get_lyrics methods into one and fixed some typechecking errors

* Fixed a missing hasTimestamps and added the doccomments to the overloads, because vscode didn't show them otherwise

* Removed the old get_lyrics_with_timestamps method

because idk where it came from...

* fixed remaining issues

* Update uploads.py

reverted some changes that I moved to an extra PR

* removed variable `context` from the Mixin, as it's use was replaced by `yt.as_mobile()`

* fix some formatting complaints by ruff and mypy

* please the linter

* fix union syntax

* improve typing in ytmusic.py

* improve typing

* replace docsbuild.yml with RTD

---------

Co-authored-by: Hendrik Horstmann <65970327+heinrich26@users.noreply.github.com>
Co-authored-by: henrich26 <hendrik-horstmann@o2mail.de>
2024-12-17 22:12:06 +01:00
sigma67
db732f29b9 fix #675 2024-12-17 18:28:14 +01:00
sigma67
7d8a756638
upload_song: add error when file exceeds limit of 300MB (#653)
* upload_song: add error when file exceeds limit of 300MB (closes #647)

* fix import
2024-10-05 11:40:51 +02:00
sigma67
09ca398719
fix #642: create_playlist: raise error when invalid characters are pa… (#652)
* fix #642: create_playlist: raise error when invalid characters are part of playlist title

* add test

* fix CI helper

* fix CI helper

* adjust workflow
2024-10-05 11:31:11 +02:00
sigma67
a15d90c4f3
add get_user_videos (#632)
* add get_user_videos

* add to docs
2024-07-24 19:37:33 +02:00
sigma67
8d6dd117eb fix test broken by added podcasts on oasis page 2024-07-23 21:40:00 +02:00
czifumasa
895ebb0898 tests for tracks in collaborative playlists 2024-07-23 21:40:00 +02:00
sigma67
05cb3caf4a
fix some more tests 2024-07-03 22:05:50 +02:00
sigma67
2217f3d92d
fix #544 (#560)
* fix #544

* fix ignores
2024-04-05 20:53:32 +02:00
sigma67
0d996030f4 get_artist: shows support 2024-03-13 20:53:08 +01:00
sigma67
f237d50ab7 fix tests 2024-02-22 20:47:15 +01:00
sigma67
e1bcb88c92 Revert "get_charts: removed trending category (no longer available on YTM)"
This reverts commit da492e49f6.
2024-02-22 20:47:15 +01:00
sigma67
f98274f0ec improve coverage 2024-02-04 17:03:59 +01:00
sigma67
da492e49f6 get_charts: removed trending category (no longer available on YTM) 2024-02-04 17:03:59 +01:00
sigma67
cc26a63264 get_watch_playlist: fixed an issue when longBylineText is missing 2024-02-04 17:03:59 +01:00
sigma67
170eea358d add brand account setup script (#520) 2024-02-04 17:03:59 +01:00
John Birdwell
123eae7370
get_album: parse more data from response + correct keys on other_vers… (#523)
* get_album: parse more data from response + correct keys on other_versions

* keys: fair point

* navigation, browsing: removed duplicate SUBTITLE

---------

Co-authored-by: sigma67 <ytmusicapi@gmail.com>
2024-01-21 19:39:52 +01:00
sigma67
650bc24d68 get_album: rename track_number to trackNumber 2024-01-21 18:43:27 +01:00
John Birdwell
2b42c58963
get_album: track_number returns none when track unavailable + test (#516)
* get_album: track_number returns none when track unavailable + test

* Update ytmusicapi/parsers/playlists.py

Co-authored-by: sigma67 <16363825+sigma67@users.noreply.github.com>

* test_get_album: sans fixtures

---------

Co-authored-by: sigma67 <16363825+sigma67@users.noreply.github.com>
2024-01-14 14:38:29 +01:00
John Birdwell
ba71fc998d
get_album: track positions (#510)
* get_album (via parse_playlist_items): add track_position key + tests for the badly indexed album

* get_album & parse_playlist_items: nav changes

* parse_playlist_items: only add track_position for albums

* parse_playlist_items & related test_browsing: track_position > track_number

---------

Co-authored-by: sigma67 <sigma67.github@gmail.com>
2024-01-11 20:02:23 +01:00
sigma67
b094345e44
add test for order exception 2024-01-10 21:22:21 +01:00
sigma67
e864a6be53 get_artist_albums: add order param (#441) 2024-01-10 21:19:59 +01:00
sigma67
f2be19416b get_artist_albums: support continuations (#441) 2024-01-10 21:19:59 +01:00
sigma67
d4bea93414
improve coverage 2024-01-02 22:29:41 +01:00
sigma67
69dd4a9f2f test restructuring via pytest 2024-01-02 22:09:22 +01:00