Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Soundcloud require authentication #166

Open
Karry opened this issue Nov 20, 2022 · 2 comments
Open

Soundcloud require authentication #166

Karry opened this issue Nov 20, 2022 · 2 comments

Comments

@Karry
Copy link

Karry commented Nov 20, 2022

Using gPodder 4.12.0, when I'm trying to search podcast on Soundcloud, it fails because of http/401 "Unauthorized". It seems that api was changed recently.

[D] unknown:0 - "PyOtherSide error: Traceback (most recent call last):\n\n  File \"/usr/share/harbour-org.gpodder.sailfish/main.py\", line 467, in get_directory_entries\n    } for e in provider.on_string(query)]\n\n  File \"/usr/share/harbour-org.gpodder.sailfish/gpodder/directory.py\", line 57, in on_string\n    return self.on_search(query)\n\n  File \"/usr/share/harbour-org.gpodder.sailfish/gpodder/plugins/soundcloud.py\", line 307, in on_search\n    for entry in util.read_json(json_url)]\n\n  File \"/usr/share/harbour-org.gpodder.sailfish/gpodder/util.py\", line 859, in read_json\n    return json.loads(urlopen(url).read().decode('utf-8'))\n\n  File \"/usr/share/harbour-org.gpodder.sailfish/gpodder/util.py\", line 690, in urlopen\n    return opener.open(request)\n\n  File \"/usr/lib64/python3.8/urllib/request.py\", line 531, in open\n    response = meth(req, response)\n\n  File \"/usr/lib64/python3.8/urllib/request.py\", line 640, in http_response\n    response = self.parent.error(\n\n  File \"/usr/lib64/python3.8/urllib/request.py\", line 569, in error\n    return self._call_chain(*args)\n\n  File \"/usr/lib64/python3.8/urllib/request.py\", line 502, in _call_chain\n    result = func(*args)\n\n  File \"/usr/lib64/python3.8/urllib/request.py\", line 649, in http_error_default\n    raise HTTPError(req.full_url, code, msg, hdrs, fp)\n\nurllib.error.HTTPError: HTTP Error 401: Unauthorized\n"
[D] onError:95 - Python failure: Return value of PyObject call is NULL: Traceback (most recent call last):
@Keeper-of-the-Keys
Copy link
Contributor

Yeah they changed the way the API works, I have not had the time to really look into it, it was mentioned in the changelog of 4.12.90 (openrepos) that Soundcloud is currently broken, patches are very welcome.

Please note that the Soundcloud plugin lives in https://github.com/gpodder/gpodder-core so that is where most PRs will need to be done.

@Keeper-of-the-Keys
Copy link
Contributor

We have no way to resolve this within the Terms of Use of Soundcloud API and the ID of a user also does not match the ID of RSS links so I don't know of an easy workaround.
A lot of soundcloud podcasts are listed on apple podcasts so the apple podcast search that was added in 4.14 should be helpful.

Leaving this open for suggestions for deal with soundcloud.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants