gpodder / mygpo

The gpodder.net webservice
http://gpodder.net/
GNU Affero General Public License v3.0
273 stars 85 forks source link

Unable to retrieve logos from podigee.io #609

Open rw-django-fan-2020 opened 3 years ago

rw-django-fan-2020 commented 3 years ago

I guess all podcasts hosted on podigee.io have an issue with mygpo. After using the command feed-downloader for podigee urls on my self-hosted gpodder-server I get no image of the podcast.

I get the following debug info: [2021-06-25 07:42:23 +0000] [234] [DEBUG] GET /logo/128/83b/83bc57a02500fd30a0b1513150edf13d0b697e5c 2021-06-25 07:42:23,388 mygpo.web.logo WARNING Cover file logo/original/83b/83bc57a02500fd30a0b1513150edf13d0b697e5c cannot be opened: cannot identify image file <File: /srv/mygpo/media/logo/original/83b/83bc57a02500fd30a0b1513150edf13d0b697e5c>

My guess is that the image url in the feed file are not wellformated for mygpo.

Example: url for feed: https://ct-auslegungssache.podigee.io/feed/mp3 image url in feed file: https://images.podigee-cdn.net/0x,s2sEs2U7V3jGypDQWvxrOd8dpoXnHrUtl8OKixkE-eU4=/https://cdn.podigee.com/uploads/u13959/11ae8db4-2a82-4c74-914e-72d3690133e4.png

The command feed-downloader is changing some special characters from image url because I get the following information: 2021-06-25 08:02:59,470 mygpo.web.logo INFO Logo https://images.podigee-cdn.net/0x%2Cs2sEs2U7V3jGypDQWvxrOd8dpoXnHrUtl8OKixkE-eU4%3D/https%3A//cdn.podigee.com/uploads/u13959/11ae8db4-2a82-4c74-914e-72d3690133e4.png, saving to logo/original/83b/83bc57a02500fd30a0b1513150edf13d0b697e5c

Now then I copy and paste this url into my browser I get: invalid request URL: malformed URL "/0x%2Cs2sEs2U7V3jGypDQWvxrOd8dpoXnHrUtl8OKixkE-eU4%3D/https%3A//cdn.podigee.com/uploads/u13959/11ae8db4-2a82-4c74-914e-72d3690133e4.png": must provide absolute remote URL

Ryochan7 commented 3 years ago

I am getting the same issue with that feed as well. The problem seems to lie with the feed parsing service at http://feeds.gpodder.net/parse. The JSON response returns the invalid URL for the podcast logo. Unescaping a few characters from the returned URL will give the proper image URL and then the image can be retrieved.

Ryochan7 commented 3 years ago

https://github.com/gpodder/mygpo-feedservice/blob/414544c16f982806dd6b0733281e56c17e703bf6/feedservice/utils.py#L129