Get track URLs
This commit is contained in:
parent
2e06dc231f
commit
ae3e32cd21
@ -55,6 +55,7 @@ class User:
|
||||
following = []
|
||||
|
||||
class Track:
|
||||
url = ''
|
||||
title = None
|
||||
artist = None
|
||||
date = None
|
||||
@ -141,10 +142,11 @@ def Get_Tracks_Info(url, limit = 100):
|
||||
if track_elem.find(class_='sound__trackList'):
|
||||
continue
|
||||
|
||||
# Grab the title
|
||||
# Grab the title and url
|
||||
title_elem = track_elem.find(class_='soundTitle__title')
|
||||
if title_elem:
|
||||
track.title = title_elem.span.string.strip()
|
||||
track.url = 'https://soundcloud.com' + title_elem['href']
|
||||
|
||||
# Grab who uploaded it (usually the artist unless it's a label)
|
||||
artist_elem = track_elem.find(class_='soundTitle__usernameText')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user