Added category to get_song() results.
This commit is contained in:
parent
a1b6b06835
commit
1fb0968760
1 changed files with 2 additions and 0 deletions
|
|
@ -508,6 +508,7 @@ class BrowsingMixin:
|
||||||
"Producer: Owen Morris & Noel Gallagher"
|
"Producer: Owen Morris & Noel Gallagher"
|
||||||
],
|
],
|
||||||
"release": "2014-09-29"
|
"release": "2014-09-29"
|
||||||
|
"category": "Music"
|
||||||
}
|
}
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
@ -519,6 +520,7 @@ class BrowsingMixin:
|
||||||
return text
|
return text
|
||||||
player_response = json.loads(text['player_response'][0])
|
player_response = json.loads(text['player_response'][0])
|
||||||
song_meta = player_response['videoDetails']
|
song_meta = player_response['videoDetails']
|
||||||
|
song_meta['category'] = player_response['microformat']['playerMicroformatRenderer']['category']
|
||||||
if song_meta['shortDescription'].endswith("Auto-generated by YouTube."):
|
if song_meta['shortDescription'].endswith("Auto-generated by YouTube."):
|
||||||
try:
|
try:
|
||||||
description = song_meta['shortDescription'].split('\n\n')
|
description = song_meta['shortDescription'].split('\n\n')
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue