Skip to content

Commit

Permalink
fix: return data maybe dict?
Browse files Browse the repository at this point in the history
Signed-off-by: yihong0618 <[email protected]>
  • Loading branch information
yihong0618 committed Mar 25, 2024
1 parent fa3b364 commit cb2f458
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name="suno_songs",
version="0.2.1",
version="0.2.3",
author="yihong0618",
author_email="[email protected]",
description="High quality image generation by ideogram.ai. Reverse engineered API.",
Expand Down
3 changes: 3 additions & 0 deletions suno/suno.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ def _fetch_songs_metadata(self, ids):
response = self.session.get(url, impersonate=browser_version)
try:
data = response.json()
if type(data) == dict:
print(data)
data = [data]
self.now_data = data
except:
if response.json().get("detail", "") == "Unauthorized":
Expand Down

0 comments on commit cb2f458

Please sign in to comment.