Skip to content

Commit

Permalink
Fix artist chart
Browse files Browse the repository at this point in the history
  • Loading branch information
joinemm committed Jul 29, 2023
1 parent 159a9d0 commit 214a517
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cogs/lastfm.py
Original file line number Diff line number Diff line change
Expand Up @@ -2603,7 +2603,8 @@ async def scrape_artists_for_chart(self, username, period, amount):
raise exceptions.LastFMError(0, error)

soup = BeautifulSoup(data, "lxml")
imagedivs = soup.findAll("td", {"class": "chartlist-image"})
tbody = soup.findAll("tbody", {"data-playlisting-add-entries": ""})[-2]
imagedivs = tbody.findAll("td", {"class": "chartlist-image"})
images += [
div.find("img")["src"].replace("/avatar70s/", "/300x300/")
for div in imagedivs
Expand Down

0 comments on commit 214a517

Please sign in to comment.