defe icon indicating copy to clipboard operation
defe copied to clipboard

header images for webapp

Open Bhupesh-V opened this issue 4 years ago • 9 comments

Is your feature request related to a problem? Please describe. It would be nice to show some header images (if the feed provides it) Something like this probably

Describe the solution you'd like For every card rendered on webapp we can show the image if it exists The feedparser library colllects these links for us in a single key

f3 = feedparser.parse("https://www.telegraph.co.uk/technology/rss.xml")
f3.entries[0].links
[{'rel': 'alternate', 'type': 'text/html', 'href': 'https://www.telegraph.co.uk/technology/0/houseparty-app-delete-account-is-safe/'}, {'length': '99', 'type': 'image/jpeg', 'href': 'https://www.telegraph.co.uk/content/dam/technology/2020/03/31/Conversation-8-People_trans_NvBQzQNjv4BqZgEkZX3M936N5BQK4Va8RWtT0gK_6EfZT336f62EI5U.jpg', 'rel': 'enclosure'}]

Usually the images will exist in either the links key or sometimes in media_content

>>> f = feedparser.parse("https://www.freecodecamp.org/news/rss/")
>>> f.entries[0].keys()
dict_keys(['title', 'title_detail', 'summary', 'summary_detail', 'links', 'link', 'id', 'guidislink', 'tags', 'authors', 'author', 'published', 'published_parsed', 'media_content', 'content'])
>>> f.entries[0]['media_content']
[{'url': 'https://www.freecodecamp.org/news/content/images/2020/04/sunset_loading2-1.gif', 'medium': 'image'}]

One thing to note that the images may exist for some source & not for others, so make sure there is a fallback mechanism (if/else to say :sweat_smile: )

Bhupesh-V avatar Apr 05 '20 13:04 Bhupesh-V

Hi, I would like to take on this task. Please assign.

Regards, Best Olunusi.

olunusib avatar Apr 20 '20 23:04 olunusib

Sure @Olunusib :+1: Hit me up if you need any help

Bhupesh-V avatar Apr 21 '20 06:04 Bhupesh-V

@Olunusib Are you working on this ?

Bhupesh-V avatar May 21 '20 14:05 Bhupesh-V

Hi, is this issue still open?

bgtripp avatar Nov 09 '20 23:11 bgtripp

Hi, is this issue still open?

yes it is

Bhupesh-V avatar Nov 10 '20 05:11 Bhupesh-V

I can give it a shot!

bgtripp avatar Nov 12 '20 21:11 bgtripp

Please assign it when you can.

bgtripp avatar Nov 13 '20 01:11 bgtripp

Hi, I implemented a way for this to work using the media_content and links keys as suggested. This works well for the general and news feeds, but those keys almost never exist for the podcasts or newsletters feeds. Should I submit a pull request for this initial solution?

bgtripp avatar Nov 13 '20 23:11 bgtripp

Hi, I implemented a way for this to work using the media_content and links keys as suggested. This works well for the general and news feeds, but those keys almost never exist for the podcasts or newsletters feeds. Should I submit a pull request for this initial solution?

Sure. We can ignore header images for podcasts and newsletters

Bhupesh-V avatar Nov 14 '20 06:11 Bhupesh-V

Hello @Bhupesh-V , I would like to work on this issue. This is my first contribution . Please assign me a file accordingly.

aakashraj01 avatar Aug 29 '21 13:08 aakashraj01