Quantcast
Channel: Planet Ubuntu
Viewing all articles
Browse latest Browse all 17727

Richard Johnson: Download Photos From Picasa

$
0
0

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.

Download Photos From Picasa is a post from Richard A. Johnson's blog.


Viewing all articles
Browse latest Browse all 17727

Trending Articles