Why only 21 images at a time?

Aaron asked a good question they other day.

Why does ObSrv only ever return 21 images at one time?

I thought it was a bug in my code, but it’s not. ObSrv pulls images from Google Image Search, and Google only ever returns 21 images in one go.

But this is not a problem. The images are embedded into a MediaRSS feed. That feed is cached for a maximum of one hour. After this time if you request the same feed, ObSrv will search again, but it will add in up to 21 extra images that weren’t shown last time.  So on subsequent calls you’ll get more than 21 images in the feed.  In the unlikely event that it runs out of images, it starts searching from the beginning again.

So although there’s nothing I can do about the 21 images at a time issue, it’s not a major problem because you will get more images after the feed refreshes – but remember, to save server resources (and to stop Google from banning me) it waits an hour between doing searches on the same terms.

One Reply to “Why only 21 images at a time?”

  1. Neil, obsrv.com has been down for the last days? Are you having problems? Are you stopping the development of this site?
    It’s a great feature, don’t give up!

    Thanks,

    Matias.

Leave a Reply

Your email address will not be published.