So, I was tasked to download a bunch of images from another person’s Picasa gallery. At first this looked to be a pain in the rear, but I had noticed that on the right hand side of the person’s gallery there is an RSS feed. I quickly thought of Python with a bit of feedparser thrown in. And in just a few lines I was able to grab all of the photos from someone else’s gallery. The code isn’t clean, isn’t optimal, but it works.
#!/usr/bin/env python import feedparser, os items = feedparser.parse("<remote picasa web rss feed>")['items'] for i in range(0, len(items)): os.system("wget -q %s" % items[i]['media_content'][0]['url'])
Works good for a quick 4 lines of code.