danmactough / node-feedparser

Robust RSS, Atom, and RDF feed parsing in Node.js
Other
1.97k stars 190 forks source link

Low resolution images in parsed feed #217

Closed eldimious closed 7 years ago

eldimious commented 7 years ago

Hey guys. I am using your module to parse some xml urls, but i have an issue when the feed includes image, i get images with low resolution, while in their site the image has higher resolution. For example i am trying to parse feeds from this url http://rss.cnn.com/rss/edition_technology.rss. The parsed feeds i get includes for example an image url http://i2.cdn.turner.com/cnn/dam/assets/161114161121-01-super-moon-2016-restricted-top-tease.jpg, with link http://rss.cnn.com/~r/rss/edition_technology/~3/Oug_nlpREEE/index.html. If you visit this link, you can see that the image has a lot higher resolution and also using postman i get as og:image from this url this one: http://i2.cdn.cnn.com/cnnnext/dam/assets/161114161121-01-super-moon-2016-restricted-super-tease.jpg (image with higher resolution). Any thoughts why feedparser returns images with low resolution??

Thanks for this great library!

rdbcci commented 7 years ago

Content returned by Feedparser is what is in "http://rss.cnn.com/rss/edition_technology.rss". Not familiar with "postman" so can't help you there. Specifically, feed (http://rss.cnn.com/rss/edition_technology.rss) contains "http://i2.cdn.turner.com/cnn/dam/assets/161114161121-01-super-moon-2016-restricted-top-tease.jpg" not "http://i2.cdn.cnn.com/cnnnext/dam/assets/161114161121-01-super-moon-2016-restricted-super-tease.jpg" or any "og:" tags.

eldimious commented 7 years ago

@rdbcci hey thanks for your comment and sorry for my late response. You are right when i making a call to http://rss.cnn.com/rss/edition_technology.rss i get http://i2.cdn.turner.com/cnn/dam/assets/161114161121-01-super-moon-2016-restricted-top-tease.jpg. I thought that someway we can retrieve original image from the posts that rss url contains(for example from http://rss.cnn.com/~r/rss/edition_technology/~3/Oug_nlpREEE/index.html --> it is one of the post urls that rss contains).

rdbcci commented 7 years ago

Feedparser only knows about the feed. It does not follow any links found in the feed to gather further info. You would need to follow the the link yourself.

eldimious commented 7 years ago

@rdbcci yep you are right. We can close this issue as invalid.

danmactough commented 7 years ago

thanks @rdbcci