Covered more cases in unittest and documentation
This commit is contained in:
parent
d66f20aa13
commit
f7ef0d2c15
4 changed files with 43 additions and 29 deletions
|
|
@ -287,17 +287,3 @@ def parse_related_artist(data):
|
|||
'subscribers': subscribers,
|
||||
'thumbnails': nav(data, THUMBNAIL_RENDERER),
|
||||
}
|
||||
|
||||
|
||||
def parse_tasteprofiles(data):
|
||||
profiles = nav(data, TASTE_PROFILE_ITEMS)
|
||||
|
||||
taste_profiles = {}
|
||||
for itemList in profiles:
|
||||
for item in itemList["tastebuilderItemListRenderer"]["contents"]:
|
||||
artist = nav(item["tastebuilderItemRenderer"], TASTE_PROFILE_ARTIST)[0]["text"]
|
||||
taste_profiles[artist] = {
|
||||
"selectionValue": item["tastebuilderItemRenderer"]["selectionFormValue"],
|
||||
"impressionValue": item["tastebuilderItemRenderer"]["impressionFormValue"]
|
||||
}
|
||||
return taste_profiles
|
||||
|
|
|
|||
Loading…
Reference in a new issue