diff --git a/scrape.py b/scrape.py index a1f4591..cc94475 100755 --- a/scrape.py +++ b/scrape.py @@ -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')