I have a function that returns an image URL from an RSS feed (I'm using feedparser). The problem is that it returns a strange formatted list.
My feed has a key called media_content
. The code used to access it is
import feedparserNewsFeed = feedparser.parse("https://thegroovecartel.com/feed/")entry = NewsFeed.entries[0]post_image = entry.media_content
Now, for some reason post_image is a list of 1 element formattes as:
[{'url': 'https://thegroovecartel.com/i1.wp.com/thegroovecartel.com/wp-content/uploads/2020/10/KAYYA.jpg?fit=300%2C237&ssl=1', 'medium': 'image'}]
Now, I can't understand how to access the actual URL field to have https://thegroovecartel.com/i1.wp.com/thegroovecartel.com/wp-content/uploads/2020/10/KAYYA.jpg?fit=300%2C237&ssl=1
as a string into a variable.