Closed arsaboo closed 1 year ago
Have you completed the login first, as per the documentation?
import tidalapi
session = tidalapi.Session()
# Will run until you visit the printed url and link your account
session.login_oauth_simple()
...
Yes, I have completed the login. Track search works.
Here's the output of a track search:
import tidalapi
search_result = session.search(query="Cuff It", models = [tidalapi.media.Track])
print(search_result)
Here's the output:
{'artists': [], 'albums': [], 'tracks': [<tidalapi.media.Track object at 0x000001F781B0EC40>, <tidalapi.media.Track object at 0x000001F781CC7FA0>, <tidalapi.media.Track object at 0x000001F7818F9DC0>, <tidalapi.media.Track object at 0x000001F781C270D0>, <tidalapi.media.Track object at 0x000001F7804562E0>, <tidalapi.media.Track object at 0x000001F781CBD8E0>, <tidalapi.media.Track object at 0x000001F781C15E50>, <tidalapi.media.Track object at 0x000001F781A52190>, <tidalapi.media.Track object at 0x000001F781A52DF0>, <tidalapi.media.Track object at 0x000001F781A528E0>, <tidalapi.media.Track object at 0x000001F781A525B0>, <tidalapi.media.Track object at 0x000001F781A52520>, <tidalapi.media.Track object at 0x000001F781A52B50>, <tidalapi.media.Track object at 0x000001F781A52400>], 'videos': [], 'playlists': [], 'top_hit': <tidalapi.media.Track object at 0x000001F781A52D60>}
Can you provide a working album search snippet...thanks!
Ok...looks like the code is working. We get the first output when there are no search results.
{'artists': [], 'albums': [], 'tracks': [], 'videos': [], 'playlists': [], 'top_hit': None}
If a result is returned, we get the right out. Closing this...thanks!
I am trying to search for albums on Tidal. Here's the code that I have:
Here's the output that I am getting: