diff --git a/scrape.py b/scrape.py index 9a93e66..c0f23be 100755 --- a/scrape.py +++ b/scrape.py @@ -209,8 +209,11 @@ def Get_Tracks_Info(url, limit = 100): # Grab the title and url title_elem = track_elem.find(class_='soundTitle__title') if title_elem: - track.title = str(title_elem.span.string.strip()) track.url = 'https://soundcloud.com' + title_elem['href'] + if title_elem.span.string: + track.title = str(title_elem.span.string.strip()) + else: + track.title = '' # Check if we have already gotten this track before if track.url in tracks.keys():