suyashb95 / soundcloud-dl

A Python project that downloads tracks from soundcloud.com, complete with metadata and album art
125 stars 20 forks source link

playlist download json collection error #30

Closed Soltinator closed 11 months ago

Soltinator commented 2 years ago

i tried to download a playlist using python versions 3.7.2 and 3.9.6 and i get the same error. this error is from 3.9.6. tell me if there is a log file or anything needed.

\ Fetching uploadsTraceback (most recent call last):
  File "c:\users\aliso\.pyenv\pyenv-win\versions\3.9.6\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\aliso\.pyenv\pyenv-win\versions\3.9.6\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\aliso\.pyenv\pyenv-win\versions\3.9.6\Scripts\sc-dl.exe\__main__.py", line 7, in <module>
  File "c:\users\aliso\.pyenv\pyenv-win\versions\3.9.6\lib\site-packages\soundcloud_dl.py", line 64, in main
    d.main()
  File "c:\users\aliso\.pyenv\pyenv-win\versions\3.9.6\lib\site-packages\downloader\downloader.py", line 205, in main
    self.get_uploaded_tracks(data)
  File "c:\users\aliso\.pyenv\pyenv-win\versions\3.9.6\lib\site-packages\downloader\downloader.py", line 143, in get_uploaded_tracks
    tracks += json_payload["collection"]
KeyError: 'collection'

i want to download my playlist and have it on usb in car. i hate broken aux cables and low quality bluetooth. that seem to be the only solution i have left. is my python install wrong? im using pyenv-win. i installed this using pip install soundcloud-dl

Soltinator commented 2 years ago

so after investigating the code with my small python brain i found out this:

this is the response that is downloaded.

{'artwork_url': 'https://i1.sndcdn.com/artworks-000131749232-kuxqvn-large.jpg', 'caption': None, 'commentable': True, 'comment_count': 2433, 'created_at': '2015-10-05T18:44:52Z', 'description': '', 'downloadable': False, 'download_count': 0, 'duration': 148637, 'full_duration': 148676, 'embeddable_by': 'all', 'genre': '<3', 'has_downloads_left': False, 'id': 227042825, 'kind': 'track', 'label_name': None, 'last_modified': '2021-11-25T12:48:46Z', 'license': 'all-rights-reserved', 'likes_count': 295027, 'permalink': 'solitude', 'permalink_url': 'https://soundcloud.com/nymano/solitude', 'playback_count': 17482154, 'public': True, 'publisher_metadata': {'id': 227042825, 'urn': 'soundcloud:tracks:227042825'}, 'purchase_title': 'instagram <3', 'purchase_url': 'https://www.instagram.com/nymanobeats', 'release_date': None, 'reposts_count': 14418, 'secret_token': None, 'sharing': 'public', 'state': 'finished', 'streamable': True, 'tag_list': '', 'title': 'solitude', 'track_format': 'single-track', 'uri': 'https://api.soundcloud.com/tracks/227042825', 'urn': 'soundcloud:tracks:227042825', 'user_id': 8388038, 'visuals': None, 'waveform_url': 'https://wave.sndcdn.com/n8U6jgr1TDD6_m.json', 'display_date': '2015-10-05T18:44:52Z', 'media': {'transcodings': [{'url': 'https://api-v2.soundcloud.com/media/soundcloud:tracks:227042825/fee57ece-f02b-461c-98b2-f2e17c405046/stream/hls', 'preset': 'mp3_0_1', 'duration': 148637, 'snipped': False, 'format': {'protocol': 'hls', 'mime_type': 'audio/mpeg'}, 'quality': 'sq'}, {'url': 'https://api-v2.soundcloud.com/media/soundcloud:tracks:227042825/fee57ece-f02b-461c-98b2-f2e17c405046/stream/progressive', 'preset': 'mp3_0_1', 'duration': 148637, 'snipped': False, 'format': {'protocol': 'progressive', 'mime_type': 'audio/mpeg'}, 'quality': 'sq'}, {'url': 'https://api-v2.soundcloud.com/media/soundcloud:tracks:227042825/a6305867-91e1-4163-9396-d744433e06b3/stream/hls', 'preset': 'opus_0_0', 'duration': 148608, 'snipped': False, 'format': {'protocol': 'hls', 'mime_type': 'audio/ogg; codecs="opus"'}, 'quality': 'sq'}]}, 'station_urn': 'soundcloud:system-playlists:track-stations:227042825', 'station_permalink': 'track-stations:227042825', 'track_authorization': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJnZW8iOiJJUiIsInN1YiI6IiIsInJpZCI6IjJiZGIwZWI4LWFhODQtNDQ4OC1iMjZmLWQ4MmQ5MjBmNmE2NyIsImlhdCI6MTYzNzkxMjgxM30.fIvisQsZnMGwyRgO2mzRNRVE6IGVBnbN2p_E7QDKFwY', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW', 'user': {'avatar_url': 'https://i1.sndcdn.com/avatars-Oo63x9h6nJQvtCON-Tp6Vrw-large.jpg', 'first_name': '', 'followers_count': 67768, 'full_name': '', 'id': 8388038, 'kind': 'user', 'last_modified': '2021-11-04T08:46:56Z', 'last_name': '', 'permalink': 'nymano', 'permalink_url': 'https://soundcloud.com/nymano', 'uri': 'https://api.soundcloud.com/users/8388038', 'urn': 'soundcloud:users:8388038', 'username': 'nymano', 'verified': False, 'city': '', 'country_code': None, 'badges': {'pro': False, 'pro_unlimited': True, 'verified': False}, 'station_urn': 'soundcloud:system-playlists:artist-stations:8388038', 'station_permalink': 'artist-stations:8388038'}}

this is the response that it fails to download

{'artwork_url': 'https://i1.sndcdn.com/artworks-000100835119-6b7ubw-large.jpg', 'caption': None, 'commentable': True, 'comment_count': 1251, 'created_at': '2014-12-20T16:31:04Z', 'description': '', 'downloadable': False, 'download_count': 0, 'duration': 127306, 'full_duration': 127306, 'embeddable_by': 'all', 'genre': 'beat', 'has_downloads_left': False, 'id': 182404492, 'kind': 'track', 'label_name': '', 'last_modified': '2021-11-25T06:56:44Z', 'license': 'all-rights-reserved', 'likes_count': 152172, 'permalink': 'quand-la-pluie-tombe', 'permalink_url': 'https://soundcloud.com/nymano/quand-la-pluie-tombe', 'playback_count': 11281694, 'public': True, 'publisher_metadata': None, 'purchase_title': None, 'purchase_url': None, 'release_date': None, 'reposts_count': 7424, 'secret_token': None, 'sharing': 'public', 'state': 'finished', 'streamable': True, 'tag_list': '', 'title': 'quand la pluie tombe (also uploaded for The Visionary Collective tape)', 'track_format': 'single-track', 'uri': 'https://api.soundcloud.com/tracks/182404492', 'urn': 'soundcloud:tracks:182404492', 'user_id': 8388038, 'visuals': None, 'waveform_url': 'https://wave.sndcdn.com/b4k3O6GFqyIW_m.json', 'display_date': '2014-12-20T16:31:04Z', 'media': {'transcodings': [{'url': 'https://api-v2.soundcloud.com/media/soundcloud:tracks:182404492/c2f23945-ec1b-4cc4-b937-a349903f2310/stream/hls', 'preset': 'mp3_0_0', 'duration': 127306, 'snipped': False, 'format': {'protocol': 'hls', 'mime_type': 'audio/mpeg'}, 'quality': 'sq'}, {'url': 'https://api-v2.soundcloud.com/media/soundcloud:tracks:182404492/c2f23945-ec1b-4cc4-b937-a349903f2310/stream/progressive', 'preset': 'mp3_0_0', 'duration': 127306, 'snipped': False, 'format': {'protocol': 'progressive', 'mime_type': 'audio/mpeg'}, 'quality': 'sq'}, {'url': 'https://api-v2.soundcloud.com/media/soundcloud:tracks:182404492/e4ef7d6f-2f7d-4cf6-b725-49358046b323/stream/hls', 'preset': 'opus_0_0', 'duration': 127306, 'snipped': False, 'format': {'protocol': 'hls', 'mime_type': 'audio/ogg; codecs="opus"'}, 'quality': 'sq'}]}, 'station_urn': 'soundcloud:system-playlists:track-stations:182404492', 'station_permalink': 'track-stations:182404492', 'track_authorization': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJnZW8iOiJJUiIsInN1YiI6IiIsInJpZCI6ImViY2NiOWFiLWQ0NDAtNGEzNi05YjU3LTQ0N2MwMjNkZjI0MyIsImlhdCI6MTYzNzkxMjgxM30.zOs4LAQdV2msFdp4P1sSrb4reo_eU-MUaktsLbsBWFs', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW', 'user': {'avatar_url': 'https://i1.sndcdn.com/avatars-Oo63x9h6nJQvtCON-Tp6Vrw-large.jpg', 'first_name': '', 'followers_count': 67768, 'full_name': '', 'id': 8388038, 'kind': 'user', 'last_modified': '2021-11-04T08:46:56Z', 'last_name': '', 'permalink': 'nymano', 'permalink_url': 'https://soundcloud.com/nymano', 'uri': 'https://api.soundcloud.com/users/8388038', 'urn': 'soundcloud:users:8388038', 'username': 'nymano', 'verified': False, 'city': '', 'country_code': None, 'badges': {'pro': False, 'pro_unlimited': True, 'verified': False}, 'station_urn': 'soundcloud:system-playlists:artist-stations:8388038', 'station_permalink': 'artist-stations:8388038'}}

this is the response after 5 good response.

{'id': 277847358, 'kind': 'track', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW'}, 

i had to make it so it ignores errors when exceptions comes.

this is the raw data i recived from res = self.session.get(url, params=params) :

{'artwork_url': 'https://i1.sndcdn.com/artworks-000692038081-luurpv-large.jpg', 'created_at': '2016-11-03T23:43:30Z', 'description': ": there's no need for stress... & follow us on Spotify ► mezzanotte.lnk.to/lofi", 'duration': 5832930, 'embeddable_by': 'all', 'genre': 'lofi-jazzflow', 'id': 272741983, 'kind': 'playlist', 'label_name': '', 'last_modified': '2021-10-11T07:22:31Z', 'license': 'all-rights-reserved', 'likes_count': 387954, 'managed_by_feeds': False, 'permalink': 'acid-jazz', 'permalink_url': 'https://soundcloud.com/lordafi/sets/acid-jazz', 'public': True, 'purchase_title': None, 'purchase_url': None, 'release_date': None, 'reposts_count': 35971, 'secret_token': None, 'sharing': 'public', 'tag_list': 'Jazz Piano Chill beats lofi Electronic "Acid Jazz"', 'title': 'Acid Jazz', 'uri': 'https://api.soundcloud.com/playlists/272741983', 'user_id': 29407354, 'set_type': '', 'is_album': False, 'published_at': '2016-11-03T23:43:30Z', 'display_date': '2016-11-03T23:43:30Z', 'user': {'avatar_url': 'https://i1.sndcdn.com/avatars-81BZfSbcZnTHzlfg-PzoSbQ-large.jpg', 'city': '', 'comments_count': 3, 'country_code': None, 'created_at': '2012-11-30T02:32:56Z', 'creator_subscriptions': [{'product': {'id': 'creator-pro-unlimited'}}], 'creator_subscription': {'product': {'id': 'creator-pro-unlimited'}}, 'description': ': a neverending solace', 'followers_count': 21391, 'followings_count': 116, 'first_name': '', 'full_name': '', 'groups_count': 0, 'id': 29407354, 'kind': 'user', 'last_modified': '2021-11-14T05:41:12Z', 'last_name': '', 'likes_count': 1779, 'playlist_likes_count': 9, 'permalink': 'lordafi', 'permalink_url': 'https://soundcloud.com/lordafi', 'playlist_count': 5, 'reposts_count': None, 'track_count': 2, 'uri': 'https://api.soundcloud.com/users/29407354', 'urn': 'soundcloud:users:29407354', 'username': 'TMN Playlisted', 'verified': False, 'visuals': {'urn': 'soundcloud:users:29407354', 'enabled': True, 'visuals': [{'urn': 'soundcloud:visuals:89362499', 'entry_time': 0, 'visual_url': 'https://i1.sndcdn.com/visuals-000029407354-kdPt03-original.jpg'}], 'tracking': None}, 'badges': {'pro': False, 'pro_unlimited': True, 'verified': False}, 'station_urn': 'soundcloud:system-playlists:artist-stations:29407354', 'station_permalink': 'artist-stations:29407354'}, 'tracks': [{'artwork_url': 'https://i1.sndcdn.com/artworks-000131749232-kuxqvn-large.jpg', 'caption': None, 'commentable': True, 'comment_count': 2433, 'created_at': '2015-10-05T18:44:52Z', 'description': '', 'downloadable': False, 'download_count': 0, 'duration': 148637, 'full_duration': 148676, 'embeddable_by': 'all', 'genre': '<3', 'has_downloads_left': False, 'id': 227042825, 'kind': 'track', 'label_name': None, 'last_modified': '2021-11-25T12:48:46Z', 'license': 'all-rights-reserved', 'likes_count': 295027, 'permalink': 'solitude', 'permalink_url': 'https://soundcloud.com/nymano/solitude', 'playback_count': 17482171, 'public': True, 'publisher_metadata': {'id': 227042825, 'urn': 'soundcloud:tracks:227042825'}, 'purchase_title': 'instagram <3', 'purchase_url': 'https://www.instagram.com/nymanobeats', 'release_date': None, 'reposts_count': 14418, 'secret_token': None, 'sharing': 'public', 'state': 'finished', 'streamable': True, 'tag_list': '', 'title': 'solitude', 'track_format': 'single-track', 'uri': 'https://api.soundcloud.com/tracks/227042825', 'urn': 'soundcloud:tracks:227042825', 'user_id': 8388038, 'visuals': None, 'waveform_url': 'https://wave.sndcdn.com/n8U6jgr1TDD6_m.json', 'display_date': '2015-10-05T18:44:52Z', 'media': {'transcodings': [{'url': 'https://api-v2.soundcloud.com/media/soundcloud:tracks:227042825/fee57ece-f02b-461c-98b2-f2e17c405046/stream/hls', 'preset': 'mp3_0_1', 'duration': 148637, 'snipped': False, 'format': {'protocol': 'hls', 'mime_type': 'audio/mpeg'}, 'quality': 'sq'}, {'url': 'https://api-v2.soundcloud.com/media/soundcloud:tracks:227042825/fee57ece-f02b-461c-98b2-f2e17c405046/stream/progressive', 'preset': 'mp3_0_1', 'duration': 148637, 'snipped': False, 'format': {'protocol': 'progressive', 'mime_type': 'audio/mpeg'}, 'quality': 'sq'}, {'url': 'https://api-v2.soundcloud.com/media/soundcloud:tracks:227042825/a6305867-91e1-4163-9396-d744433e06b3/stream/hls', 'preset': 'opus_0_0', 'duration': 148608, 'snipped': False, 'format': {'protocol': 'hls', 'mime_type': 'audio/ogg; codecs="opus"'}, 'quality': 'sq'}]}, 'station_urn': 'soundcloud:system-playlists:track-stations:227042825', 'station_permalink': 'track-stations:227042825', 'track_authorization': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJnZW8iOiJJUiIsInN1YiI6IiIsInJpZCI6IjJiZGIwZWI4LWFhODQtNDQ4OC1iMjZmLWQ4MmQ5MjBmNmE2NyIsImlhdCI6MTYzNzkxMzg0N30.feNChzWTgzH2jNDRNHow12wxxC2hZ4NvbO0uJoY2fjI', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW', 'user': {'avatar_url': 'https://i1.sndcdn.com/avatars-Oo63x9h6nJQvtCON-Tp6Vrw-large.jpg', 'first_name': '', 'followers_count': 67768, 'full_name': '', 'id': 8388038, 'kind': 'user', 'last_modified': '2021-11-04T08:46:56Z', 'last_name': '', 'permalink': 'nymano', 'permalink_url': 'https://soundcloud.com/nymano', 'uri': 'https://api.soundcloud.com/users/8388038', 'urn': 'soundcloud:users:8388038', 'username': 'nymano', 'verified': False, 'city': '', 'country_code': None, 'badges': {'pro': False, 'pro_unlimited': True, 'verified': False}, 'station_urn': 'soundcloud:system-playlists:artist-stations:8388038', 'station_permalink': 'artist-stations:8388038'}}, {'artwork_url': 'https://i1.sndcdn.com/artworks-000100835119-6b7ubw-large.jpg', 'caption': None, 'commentable': True, 'comment_count': 1251, 'created_at': '2014-12-20T16:31:04Z', 'description': '', 'downloadable': False, 'download_count': 0, 'duration': 127306, 'full_duration': 127306, 'embeddable_by': 'all', 'genre': 'beat', 'has_downloads_left': False, 'id': 182404492, 'kind': 'track', 'label_name': '', 'last_modified': '2021-11-25T06:56:44Z', 'license': 'all-rights-reserved', 'likes_count': 152173, 'permalink': 'quand-la-pluie-tombe', 'permalink_url': 'https://soundcloud.com/nymano/quand-la-pluie-tombe', 'playback_count': 11281721, 'public': True, 'publisher_metadata': None, 'purchase_title': None, 'purchase_url': None, 'release_date': None, 'reposts_count': 7424, 'secret_token': None, 'sharing': 'public', 'state': 'finished', 'streamable': True, 'tag_list': '', 'title': 'quand la pluie tombe (also uploaded for The Visionary Collective tape)', 'track_format': 'single-track', 'uri': 'https://api.soundcloud.com/tracks/182404492', 'urn': 'soundcloud:tracks:182404492', 'user_id': 8388038, 'visuals': None, 'waveform_url': 'https://wave.sndcdn.com/b4k3O6GFqyIW_m.json', 'display_date': '2014-12-20T16:31:04Z', 'media': {'transcodings': [{'url': 'https://api-v2.soundcloud.com/media/soundcloud:tracks:182404492/c2f23945-ec1b-4cc4-b937-a349903f2310/stream/hls', 'preset': 'mp3_0_0', 'duration': 127306, 'snipped': False, 'format': {'protocol': 'hls', 'mime_type': 'audio/mpeg'}, 'quality': 'sq'}, {'url': 'https://api-v2.soundcloud.com/media/soundcloud:tracks:182404492/c2f23945-ec1b-4cc4-b937-a349903f2310/stream/progressive', 'preset': 'mp3_0_0', 'duration': 127306, 'snipped': False, 'format': {'protocol': 'progressive', 'mime_type': 'audio/mpeg'}, 'quality': 'sq'}, {'url': 'https://api-v2.soundcloud.com/media/soundcloud:tracks:182404492/e4ef7d6f-2f7d-4cf6-b725-49358046b323/stream/hls', 'preset': 'opus_0_0', 'duration': 127306, 'snipped': False, 'format': {'protocol': 'hls', 'mime_type': 'audio/ogg; codecs="opus"'}, 'quality': 'sq'}]}, 'station_urn': 'soundcloud:system-playlists:track-stations:182404492', 'station_permalink': 'track-stations:182404492', 'track_authorization': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJnZW8iOiJJUiIsInN1YiI6IiIsInJpZCI6ImViY2NiOWFiLWQ0NDAtNGEzNi05YjU3LTQ0N2MwMjNkZjI0MyIsImlhdCI6MTYzNzkxMzg0N30.yetolu85kTv5SiIvOoRODlh6b5u_sxhn3UhiwuCafzg', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW', 'user': {'avatar_url': 'https://i1.sndcdn.com/avatars-Oo63x9h6nJQvtCON-Tp6Vrw-large.jpg', 'first_name': '', 'followers_count': 67768, 'full_name': '', 'id': 8388038, 'kind': 'user', 'last_modified': '2021-11-04T08:46:56Z', 'last_name': '', 'permalink': 'nymano', 'permalink_url': 'https://soundcloud.com/nymano', 'uri': 'https://api.soundcloud.com/users/8388038', 'urn': 'soundcloud:users:8388038', 'username': 'nymano', 'verified': False, 'city': '', 'country_code': None, 'badges': {'pro': False, 'pro_unlimited': True, 'verified': False}, 'station_urn': 'soundcloud:system-playlists:artist-stations:8388038', 'station_permalink': 'artist-stations:8388038'}}, {'artwork_url': 'https://i1.sndcdn.com/artworks-000094910576-b43uay-large.jpg', 'caption': None, 'commentable': True, 'comment_count': 656, 'created_at': '2014-10-23T20:54:23Z', 'description': '', 'downloadable': False, 'download_count': 754, 'duration': 69282, 'full_duration': 69282, 'embeddable_by': 'all', 'genre': '<3', 'has_downloads_left': False, 'id': 173540224, 'kind': 'track', 'label_name': None, 'last_modified': '2021-11-25T06:56:44Z', 'license': 'all-rights-reserved', 'likes_count': 73475, 'permalink': 'women', 'permalink_url': 'https://soundcloud.com/nymano/women', 'playback_count': 7299189, 'public': True, 'publisher_metadata': None, 'purchase_title': None, 'purchase_url': None, 'release_date': None, 'reposts_count': 3566, 'secret_token': None, 'sharing': 'public', 'state': 'finished', 'streamable': True, 'tag_list': '', 'title': 'women (an extended version is available in "short stories" album)', 'track_format': 'single-track', 'uri': 'https://api.soundcloud.com/tracks/173540224', 'urn': 'soundcloud:tracks:173540224', 'user_id': 8388038, 'visuals': None, 'waveform_url': 'https://wave.sndcdn.com/WckCJ6lGavbw_m.json', 'display_date': '2014-10-23T20:54:23Z', 'media': {'transcodings': [{'url': 'https://api-v2.soundcloud.com/media/soundcloud:tracks:173540224/63e675db-666e-4305-85cc-aa430e105e8a/stream/hls', 'preset': 'mp3_0_0', 'duration': 69282, 'snipped': False, 'format': {'protocol': 'hls', 'mime_type': 'audio/mpeg'}, 'quality': 'sq'}, {'url': 'https://api-v2.soundcloud.com/media/soundcloud:tracks:173540224/63e675db-666e-4305-85cc-aa430e105e8a/stream/progressive', 'preset': 'mp3_0_0', 'duration': 69282, 'snipped': False, 'format': {'protocol': 'progressive', 'mime_type': 'audio/mpeg'}, 'quality': 'sq'}, {'url': 'https://api-v2.soundcloud.com/media/soundcloud:tracks:173540224/6aeba029-59f0-4920-a6c2-db7f26de12ef/stream/hls', 'preset': 'opus_0_0', 'duration': 69282, 'snipped': False, 'format': {'protocol': 'hls', 'mime_type': 'audio/ogg; codecs="opus"'}, 'quality': 'sq'}]}, 'station_urn': 'soundcloud:system-playlists:track-stations:173540224', 'station_permalink': 'track-stations:173540224', 'track_authorization': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJnZW8iOiJJUiIsInN1YiI6IiIsInJpZCI6ImNjODYyMDA3LTgyNTEtNDlmNS1iMmIwLTZkNjdkMDBkOGVmMyIsImlhdCI6MTYzNzkxMzg0N30.EuAdjBQ_0VuqMYEJO7bTWsh1yhie-0JPwPhf1wUEmgU', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW', 'user': {'avatar_url': 'https://i1.sndcdn.com/avatars-Oo63x9h6nJQvtCON-Tp6Vrw-large.jpg', 'first_name': '', 'followers_count': 67768, 'full_name': '', 'id': 8388038, 'kind': 'user', 'last_modified': '2021-11-04T08:46:56Z', 'last_name': '', 'permalink': 'nymano', 'permalink_url': 'https://soundcloud.com/nymano', 'uri': 'https://api.soundcloud.com/users/8388038', 'urn': 'soundcloud:users:8388038', 'username': 'nymano', 'verified': False, 'city': '', 'country_code': None, 'badges': {'pro': False, 'pro_unlimited': True, 'verified': False}, 'station_urn': 'soundcloud:system-playlists:artist-stations:8388038', 'station_permalink': 'artist-stations:8388038'}}, {'artwork_url': 'https://i1.sndcdn.com/artworks-000090875546-igglgs-large.jpg', 'caption': None, 'commentable': False, 'comment_count': None, 'created_at': '2014-09-13T05:21:21Z', 'description': 'old beat, up on bandcamp. \n\no.g. - https://goo.gl/Ad4XbG\n\nspotify: https://spoti.fi/3bf01Lb\n\napple: https://apple.co/3bk3RT5\n\namazon: https://amzn.to/37su1C9', 'downloadable': False, 'download_count': 100, 'duration': 180376, 'full_duration': 180418, 'embeddable_by': 'all', 'genre': 'Hip-Hop', 'has_downloads_left': False, 'id': 167505592, 'kind': 'track', 'label_name': None, 'last_modified': '2021-11-14T11:27:16Z', 'license': 'all-rights-reserved', 'likes_count': 282454, 'permalink': 'summers-day-version-2', 'permalink_url': 'https://soundcloud.com/jinsangbeats/summers-day-version-2', 'playback_count': 17888259, 'public': True, 'publisher_metadata': {'id': 167505592, 'urn': 'soundcloud:tracks:167505592'}, 'purchase_title': 'Download/Buy', 'purchase_url': 'https://jinsangbeats.bandcamp.com/album/summers-day-version-2', 'release_date': '2014-12-01T00:00:00Z', 'reposts_count': 18611, 'secret_token': None, 'sharing': 'public', 'state': 'finished', 'streamable': True, 'tag_list': 'Loop Jazz Beat jinsang', 'title': "summer's day. [v2]", 'track_format': 'single-track', 'uri': 'https://api.soundcloud.com/tracks/167505592', 'urn': 'soundcloud:tracks:167505592', 'user_id': 50894740, 'visuals': None, 'waveform_url': 'https://wave.sndcdn.com/IdWoprAl4fut_m.json', 'display_date': '2014-09-13T05:21:21Z', 'media': {'transcodings': [{'url': 'https://api-v2.soundcloud.com/media/soundcloud:tracks:167505592/a9043f86-b01b-4a2b-b56a-90083a6f8b2a/stream/hls', 'preset': 'mp3_0_1', 'duration': 180376, 'snipped': False, 'format': {'protocol': 'hls', 'mime_type': 'audio/mpeg'}, 'quality': 'sq'}, {'url': 'https://api-v2.soundcloud.com/media/soundcloud:tracks:167505592/a9043f86-b01b-4a2b-b56a-90083a6f8b2a/stream/progressive', 'preset': 'mp3_0_1', 'duration': 180376, 'snipped': False, 'format': {'protocol': 'progressive', 'mime_type': 'audio/mpeg'}, 'quality': 'sq'}, {'url': 'https://api-v2.soundcloud.com/media/soundcloud:tracks:167505592/9bd116cd-2f69-4751-8491-a301b39e04d0/stream/hls', 'preset': 'opus_0_0', 'duration': 180356, 'snipped': False, 'format': {'protocol': 'hls', 'mime_type': 'audio/ogg; codecs="opus"'}, 'quality': 'sq'}]}, 'station_urn': 'soundcloud:system-playlists:track-stations:167505592', 'station_permalink': 'track-stations:167505592', 'track_authorization': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJnZW8iOiJJUiIsInN1YiI6IiIsInJpZCI6ImE4NDkyYWRmLTM3OTAtNGU1Ni1hNDJiLWNhNzFlZGJhOWQwZSIsImlhdCI6MTYzNzkxMzg0N30.2a2dIRkiu1I9cJss8l8eh-slEUuC7LHzk-L0rxXlsxc', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW', 'user': {'avatar_url': 'https://i1.sndcdn.com/avatars-000706564438-1h94sd-large.jpg', 'first_name': '', 'followers_count': 125976, 'full_name': '', 'id': 50894740, 'kind': 'user', 'last_modified': '2021-10-10T05:35:15Z', 'last_name': '', 'permalink': 'jinsangbeats', 'permalink_url': 'https://soundcloud.com/jinsangbeats', 'uri': 'https://api.soundcloud.com/users/50894740', 'urn': 'soundcloud:users:50894740', 'username': 'jinsang', 'verified': True, 'city': 'west 
coast', 'country_code': None, 'badges': {'pro': True, 'pro_unlimited': False, 'verified': True}, 'station_urn': 'soundcloud:system-playlists:artist-stations:50894740', 'station_permalink': 'artist-stations:50894740'}}, {'artwork_url': 'https://i1.sndcdn.com/artworks-000192524644-cqiqhc-large.jpg', 'caption': None, 'commentable': True, 'comment_count': 270, 'created_at': '2016-03-20T23:22:03Z', 'description': 'https://tjck.bandcamp.com/track/119 DOWNLOAD HERE!\n\nfollow me on twitter: tjckbeats', 'downloadable': False, 'download_count': 0, 'duration': 202362, 'full_duration': 202362, 'embeddable_by': 'all', 'genre': 'R&B & Soul', 'has_downloads_left': False, 'id': 253696433, 'kind': 'track', 'label_name': None, 'last_modified': '2021-03-23T05:37:48Z', 'license': 'all-rights-reserved', 'likes_count': 34533, 'permalink': '119a', 'permalink_url': 'https://soundcloud.com/tjck/119a', 'playback_count': 4930640, 'public': True, 'publisher_metadata': {'id': 253696433, 'urn': 'soundcloud:tracks:253696433', 'artist': 'TJCK', 'contains_music': True, 'isrc': 'QZHZD2075806'}, 'purchase_title': None, 'purchase_url': None, 
'release_date': None, 'reposts_count': 1205, 'secret_token': None, 'sharing': 'public', 'state': 'finished', 'streamable': True, 'tag_list': 'Beats Soul "Hip Hop"', 'title': '119', 'track_format': 'single-track', 'uri': 'https://api.soundcloud.com/tracks/253696433', 'urn': 'soundcloud:tracks:253696433', 'user_id': 75492392, 'visuals': None, 'waveform_url': 'https://wave.sndcdn.com/WMehfjIcql8a_m.json', 'display_date': '2016-03-20T23:22:03Z', 'media': {'transcodings': [{'url': 'https://api-v2.soundcloud.com/media/soundcloud:tracks:253696433/de080ed5-c5a4-435d-86b3-3f39c2796c41/stream/hls', 'preset': 'mp3_0_0', 'duration': 202362, 'snipped': False, 'format': {'protocol': 'hls', 'mime_type': 'audio/mpeg'}, 'quality': 'sq'}, {'url': 'https://api-v2.soundcloud.com/media/soundcloud:tracks:253696433/de080ed5-c5a4-435d-86b3-3f39c2796c41/stream/progressive', 'preset': 'mp3_0_0', 'duration': 202362, 'snipped': False, 'format': {'protocol': 'progressive', 'mime_type': 'audio/mpeg'}, 'quality': 'sq'}]}, 'station_urn': 'soundcloud:system-playlists:track-stations:253696433', 'station_permalink': 'track-stations:253696433', 'track_authorization': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJnZW8iOiJJUiIsInN1YiI6IiIsInJpZCI6IiIsImlhdCI6MTYzNzkxMzg0N30.oLoUjjpF9IM-TYM54WMTJZl_FS2ylqFhIxog-Ga7fgw', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW', 'user': {'avatar_url': 'https://i1.sndcdn.com/avatars-AFcBs5OgVT37JiV3-Mtp1RA-large.jpg', 'first_name': '', 'followers_count': 880, 'full_name': '', 'id': 75492392, 'kind': 'user', 'last_modified': '2020-09-14T05:50:02Z', 'last_name': '', 'permalink': 'tjck', 'permalink_url': 'https://soundcloud.com/tjck', 'uri': 'https://api.soundcloud.com/users/75492392', 'urn': 'soundcloud:users:75492392', 'username': 'TJCK', 'verified': False, 'city': 
'Austin', 'country_code': 'US', 'badges': {'pro': False, 'pro_unlimited': False, 'verified': False}, 'station_urn': 'soundcloud:system-playlists:artist-stations:75492392', 'station_permalink': 'artist-stations:75492392'}}, {'id': 264668692, 'kind': 'track', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW'}, {'id': 201247503, 'kind': 'track', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW'}, {'id': 275388600, 'kind': 'track', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW'}, {'id': 277847358, 'kind': 'track', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW'}, {'id': 251579456, 'kind': 'track', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW'}, {'id': 286972218, 'kind': 'track', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW'}, {'id': 767287099, 'kind': 'track', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW'}, {'id': 223147448, 'kind': 'track', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW'}, {'id': 267394004, 'kind': 'track', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW'}, {'id': 252090959, 'kind': 'track', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW'}, {'id': 210245858, 'kind': 'track', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW'}, {'id': 253275404, 'kind': 'track', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW'}, {'id': 240501065, 'kind': 'track', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW'}, {'id': 244837317, 'kind': 'track', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW'}, {'id': 223864829, 'kind': 'track', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW'}, {'id': 190009373, 'kind': 'track', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW'}, {'id': 271476164, 'kind': 'track', 'monetization_model': 
'NOT_APPLICABLE', 'policy': 'ALLOW'}, {'id': 160691557, 'kind': 'track', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW'}, {'id': 281400806, 'kind': 'track', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW'}, {'id': 6846149, 'kind': 'track', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW'}, {'id': 269155625, 'kind': 'track', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW'}, {'id': 124958228, 'kind': 'track', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW'}, {'id': 280271695, 'kind': 'track', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW'}, {'id': 298982125, 'kind': 'track', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW'}, {'id': 300863486, 'kind': 'track', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW'}, {'id': 295990448, 'kind': 'track', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW'}, {'id': 285785001, 'kind': 'track', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW'}, {'id': 154741009, 'kind': 'track', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW'}, {'id': 290026932, 'kind': 'track', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW'}, {'id': 278966878, 'kind': 'track', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW'}, {'id': 327027991, 'kind': 'track', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW'}, {'id': 344746307, 'kind': 'track', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW'}, {'id': 361884578, 'kind': 'track', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW'}, {'id': 322340831, 'kind': 'track', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW'}, {'id': 453279360, 'kind': 'track', 'monetization_model': 'NOT_APPLICABLE', 'policy': 'ALLOW'}], 'track_count': 40}

so in conclusion there is a lot of errors on the code as it seems but it will work if the api response is ok. the api needs to be fixed or totally removed. i uploaded debug code to this fork if its usefull: github.com/Soltinator/soundcloud-dl/tree/soltinatorDebug