I am using soundcloud API with python and I'm trying to open url of the song with my browser. I use this code
client = soundcloud.Client(client_id=clientIdEntry.get()) track_url = urlEntry.get() if track_url!="h": track_url = "https://"+urlEntry.get() else: track_url = urlEntry.get() track = client.get('/resolve', url=track_url) track_id = str(track.id) track = client.get("/tracks/"+track_id) stream_url = client.get(track.stream_url, allow_redirects=False) print(track.title) print("\n \n \n") print(stream_url.location) time.sleep(3) os.system("chromium-browser "+stream_url.location)
But URL contains & character and terminal won't open the text that is behind that sign. Can anyone help me?