jerrrycans commited on
Commit
bc6b347
·
verified ·
1 Parent(s): d0883bb

Update ccc.py

Browse files
Files changed (1) hide show
  1. ccc.py +8 -3
ccc.py CHANGED
@@ -37,9 +37,14 @@ def check_tidal_track(track_id):
37
  title_element = soup.find('h1', class_="font-size-regular mt-0 mb-0 ellipsis-double overflow-hidden")
38
 
39
  if title_element:
40
- # Try to find artist information
41
- artist_element = soup.find('a', class_="artist-link")
42
- artist_name = artist_element.text if artist_element else "Unknown Artist"
 
 
 
 
 
43
 
44
  track_info = f"{title_element.text}\n{artist_name}"
45
  return True, track_info
 
37
  title_element = soup.find('h1', class_="font-size-regular mt-0 mb-0 ellipsis-double overflow-hidden")
38
 
39
  if title_element:
40
+ # Try to find artist information - fixed to match the correct class
41
+ artist_element = soup.find('a', class_="artist-list-link")
42
+
43
+ if not artist_element:
44
+ # Try alternative class names that might be used for artist links
45
+ artist_element = soup.find('a', class_="text-dec-none visible-offset-0 artist-list-link hover-desktop")
46
+
47
+ artist_name = artist_element.text.strip() if artist_element else "Unknown Artist"
48
 
49
  track_info = f"{title_element.text}\n{artist_name}"
50
  return True, track_info