Open jakubincloud opened 7 years ago
Haha - ran into the same with https://soundcloud.com/lane8music/lane-8-spring-2017-mixtape! Such a good mixtape!!
Also this guy: https://soundcloud.com/snbrn/spring-sessions
I was going to comment this, but you already did. I'm trying to bulk convert a bunch of soundcloud links from a file, and this is the main thing stopping me. The other little thing is the failure to convert links to songs inside of sets, but that's not too hard to fix by doing some link parsing. If the issue above got fixed I think I could actually work with this tool. Seems neat, but it's a bit inconsistent.
@TGPSKI try to find it on youtube and use https://rg3.github.io/youtube-dl/ 👍
I believe this issue is the result of either a 403 or 401 response and is the same issue as #166 and #156 . There are various reasons why the sever is returning these codes. For example youtube-dl test in its Soundcloud file for songs that can not be streamed in that case from the US which is how I came across this issue.
I have tested the other bad links on here and they do not have the same error but a similar error
# not streamable in US
/Users/gm/Downloads- : !soundscrape https://soundcloud.com/the-concept-band/sets/goldrushed-2013-album
#added print statement of response line 505 or 518 in soundscrape.py
<Response [401]>
Traceback (most recent call last):
File "/usr/local/bin/soundscrape", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python3.6/site-packages/soundscrape/soundscrape.py", line 119, in main
process_soundcloud(vargs)
File "/usr/local/lib/python3.6/site-packages/soundscrape/soundscrape.py", line 250, in process_soundcloud
tracks = get_soundcloud_api_playlist_data(resolved.id)['tracks']
File "/usr/local/lib/python3.6/site-packages/soundscrape/soundscrape.py", line 507, in get_soundcloud_api_playlist_data
parsed = response.json()
File "/usr/local/lib/python3.6/site-packages/requests/models.py", line 894, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/local/lib/python3.6/site-packages/simplejson/__init__.py", line 516, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.6/site-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "/usr/local/lib/python3.6/site-packages/simplejson/decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.scanner.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
/Users/gm/Downloads- : !soundscrape https://soundcloud.com/goldfishlive/ultra-miami-set-2017-live-stage-goldfish
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/soundscrape/soundscrape.py", line 184, in process_soundcloud
resolved = client.get('/resolve', url=artist_url, limit=200)
File "/usr/local/lib/python3.6/site-packages/soundcloud/client.py", line 133, in _request
return wrapped_resource(make_request(method, url, kwargs))
File "/usr/local/lib/python3.6/site-packages/soundcloud/request.py", line 148, in make_request
result.raise_for_status()
File "/usr/local/lib/python3.6/site-packages/requests/models.py", line 937, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://api.soundcloud.com/tracks/315269564?client_id=175c043157ffae2c6d5fed16c3d95a4c
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/soundscrape", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python3.6/site-packages/soundscrape/soundscrape.py", line 119, in main
process_soundcloud(vargs)
File "/usr/local/lib/python3.6/site-packages/soundscrape/soundscrape.py", line 198, in process_soundcloud
hard_track_url = get_hard_track_url(item_id)
File "/usr/local/lib/python3.6/site-packages/soundscrape/soundscrape.py", line 519, in get_hard_track_url
json_response = response.json()
File "/usr/local/lib/python3.6/site-packages/requests/models.py", line 894, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/local/lib/python3.6/site-packages/simplejson/__init__.py", line 516, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.6/site-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "/usr/local/lib/python3.6/site-packages/simplejson/decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.scanner.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
/Users/gm/Downloads- : !soundscrape https://soundcloud.com/lane8music/lane-8-spring-2017-mixtape
#only changed line
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://api.soundcloud.com/tracks/314737276?client_id=175c043157ffae2c6d5fed16c3d95a4c
/Users/gm/Downloads- : !soundscrape https://soundcloud.com/solomun/bbc-1-essential-mix-live-live-from-solomun1-at-pacha-ibiza
#added print statement of response line 505 or 518 in soundscrape.py
<Response [401]>
#only changed line
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://api.soundcloud.com/tracks/293283192?client_id=175c043157ffae2c6d5fed16c3d95a4c
/Users/gm/Downloads- : !soundscrape https://soundcloud.com/snbrn/spring-sessions
#added print statement of response line 505 or 518 in soundscrape.py
<Response [401]>
#only changed line
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://api.soundcloud.com/tracks/316259408?client_id=175c043157ffae2c6d5fed16c3d95a4c
/Users/gm/Downloads- : !soundscrape https://soundcloud.com/celldweller/electric-eye
#added print statement of response line 505 or 518 in soundscrape.py
<Response [401]>
#only changed line
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://api.soundcloud.com/tracks/308914769?client_id=175c043157ffae2c6d5fed16c3d95a4c
full log log.txt
any update on this issue? I'd like to use only soundscrape, but will give this youtube-dl a try if no progress..
Some of the soundcloud urls generate JSON exception
I think the response code for http call is 401, and some links have additional protection
Example links:
Traceback: