Question

Is there an easy way to get higher resolutions for images from the google news feed in its RSS format? Currently I have access to images which are 80*80, i.e. thumbnails but I would imagine that there is a way to get higher resolutions via altering the image urls. Has anyone managed to do this before?

I am calling the RSS feed using a PHP script and then displaying the news items on my interface via javascript/jquery.

Was it helpful?

Solution

Is there an easy way to get higher resolutions for images from the google news feed in its RSS format?

RSS is RSS is RSS. It provides one place to stick an image, and the feed in question is using it for the Google News logo.

The images you're asking about aren't even part of the RSS itself, but of the HTML description of each item. Each URL looks something like:

//nt0.ggpht.com/news/tbn/PKgVs2QD1QaYnM/6.jpg

Opaque as all hell right there. You'd think that PKgV... is a unique identifier for the story, but it's not repeated anywhere else in the item.

I played around with the rest of the filename. Here's what I found so far:

  • 1.jpg: 100x100
  • 2.jpg: 100x66
  • 3.jpg: 60x60
  • 4.jpg: 60x40
  • 5.jpg: empty 1x1
  • 6.jpg: 80x80
  • 7.jpg: empty 1x1
  • 8.jpg: empty 1x1
  • 9.jpg: 70x46
  • 10.jpg: 70x70
  • 11.jpg: 150x150
  • 12.jpg: 80x45
  • 13.jpg and all subsequent numbers: 80x53

So, it looks like if you manually search and replace the image URL, changing it from 6 to 11, you'll get a 150x150 image instead of an 80x80. Usually. I tested with a few other search terms and found small variations on each size depending on each image.

Be warned that this is most likely not to be true forever, and you're basically playing with an unknown, undefined application here. Google may even be upset at you for using the "wrong" images.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top