Skip to content

Commit

Permalink
fix Spotify playlists without query part
Browse files Browse the repository at this point in the history
  • Loading branch information
solaluset committed Nov 18, 2023
1 parent 1299545 commit 6f96f97
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion musicbot/linkutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ async def get_spotify_playlist(url: str) -> list:
)

async with aiohttp.ClientSession(headers=headers) as session:
async with session.get(url + "&nd=1") as response:
if "?si=" in url:
url += "&nd=1"
async with session.get(url) as response:
page = await response.text()

soup = BeautifulSoup(page, "html.parser")
Expand Down

0 comments on commit 6f96f97

Please sign in to comment.