A script to upload files to Picasa Web Albums
Today I backed up all my family pictures and videos to Picasa Web Albums.
For several months I have been thinking of ways to backup my pictures to somewhere outside my house. I wanted something simple, scalable and inexpensive.
When I read that Google+ users can store unlimited pictures sized <= 2048 x 2048 and videos <= 15 minutes long, I decided to try using Google+ to back up my media.
Full disclosure: I work for Google, which probably predisposes me to like and use Google technologies.
Unfortunately I had my pictures in so many folders that it wasn't very convenient to use either Picasa or Picasa Web Albums Uploader to upload them.
Luckily, I'm a programmer, and Picasa Web Albums has a public API for uploading images. Over the course of an afternoon, I wrote a Python script to upload my pictures and videos from my home computer to my Picasa Web Album account. I put it up on GitHub: picasawebuploader
Good things:
For several months I have been thinking of ways to backup my pictures to somewhere outside my house. I wanted something simple, scalable and inexpensive.
When I read that Google+ users can store unlimited pictures sized <= 2048 x 2048 and videos <= 15 minutes long, I decided to try using Google+ to back up my media.
Full disclosure: I work for Google, which probably predisposes me to like and use Google technologies.
Unfortunately I had my pictures in so many folders that it wasn't very convenient to use either Picasa or Picasa Web Albums Uploader to upload them.
Luckily, I'm a programmer, and Picasa Web Albums has a public API for uploading images. Over the course of an afternoon, I wrote a Python script to upload my pictures and videos from my home computer to my Picasa Web Album account. I put it up on GitHub: picasawebuploader
Good things:
- The Google Data Protocol is easy to use.
- Python's built-in libraries made file and directory traversal easy.
- OSX's built-in "sips" image processing utility made it easy to scale images.
Bad things:
- The documentation for the Google Data Protocol is not well organized or comprehensive.
- It's undocumented how to upload videos. Luckily I found a Flicker-to-Picasa-Web script that showed me how.
To do:
- Use multiple threads to upload images in parallel.
- Prompt for password if not supplied on command line.
Comments
Long time no see. I hope all is well.
I can't seem to find where you put the script.
Thanks for your help.
Best,
Harry
PS. I always have a hard time with CAPTCHA
The entire output is as follows:
*** Images will be resized to 2048 pixels.
Traceback (most recent call last):
File "main.py", line 424, in
webAlbums = getWebAlbums(gd_client)
File "main.py", line 132, in getWebAlbums
albums = gd_client.GetUserFeed()
File "c:\Custom\Python\lib\site-packages\gdata\photos\service.py", line 235, in GetUserFeed
return self.GetFeed(uri, limit=limit)
File "c:\Custom\Python\lib\site-packages\gdata\photos\service.py", line 180, in GetFeed
raise GooglePhotosException(e.args[0])
gdata.photos.service.GooglePhotosException: (403, 'Forbidden', 'Authorization required')