use previously set requests.Session()
This commit is contained in:
parent
124e324c95
commit
66d7cd3aa5
@ -131,7 +131,7 @@ for res in plex.myPlexAccount().resources():
|
|||||||
def get_ratings_lst(section_id):
|
def get_ratings_lst(section_id):
|
||||||
headers = {'Accept': 'application/json'}
|
headers = {'Accept': 'application/json'}
|
||||||
params = {'X-Plex-Token': PLEX_TOKEN}
|
params = {'X-Plex-Token': PLEX_TOKEN}
|
||||||
content = requests.get("{}/library/sections/{}/contentRating".format(PLEX_URL, section_id),
|
content = sess.get("{}/library/sections/{}/contentRating".format(PLEX_URL, section_id),
|
||||||
headers=headers, params=params)
|
headers=headers, params=params)
|
||||||
|
|
||||||
ratings_keys = content.json()['MediaContainer']['Directory']
|
ratings_keys = content.json()['MediaContainer']['Directory']
|
||||||
|
Loading…
Reference in New Issue
Block a user