List photos and videos from Picasa Web Albums/Google+ that are over a specified width, height or duration

Google provides free/unlimited storage for both Picasa Web Albums and Google+ users under certain conditions. If you're a Google+ user, you can upload unlimited photos that fit into 2048x2048 pixels and videos not longer than 15 minutes. If you're a Picasa Web Album user without a Google+ registration, you can upload unlimited photos up to 800x800 resolution and videos with a length up to 15 minutes (but obviously these conditions may be subject to change at any time).

However if you upload high resolution photos (or longer than 15m videos) from time-to-time, then these will sooner or later hit the limit which is 1 GB for Picasa Web Albums users at the moment (and optionally you can buy extra storage from Google for a yearly fee). Unfortunately Google does not provide an easy method for users to tell which albums/photos/videos consume that 1 GB (or 80 GB or whatever your quota is).

The attached Python script helps you with this. It should be run from the commandline with a Picasa Web Ablums or Google+ username (or userid) as its first parameter and it'll list all (public) photos and videos that are over the limit for the unlimited storage pool. At the time of writing the limit is 2048 pixels for photographs and 15 minutes (900 seconds) for videos for Google+ users and these are the defaults for the script as well (but you can specify your own limits on the commandline as second and third arguments).

Actually you can use the optional 2nd and 3rd arguments (with a value of zero) to list all photos and videos (it'll print their dimensions and sizes too) in a Picasa Web Albums or Google+ account. Might come handy if you want a full listing of all your (public) uploads. Smile

The username (which is pretty much the same as the mailbox name) of a Google account is not trivial to find out. Recently you'll not find it on Google+ profiles. However you'll find the numeric user ID. If you go into the photos section of a Google+ profile, you'll find the user ID in every link to every album.
Eg. let's take a look on National Geographic's profile. If you go into their photos, you'll find album links like this one: https://plus.google.com/photos/109600806421917664383/albums/5673171928649745297. Here the 109600806421917664383 number is their Google user ID.
And running my script like this:
python google_photos_over_limit.py 109600806421917664383

will list all photos and videos from National Geographic that are over the script's default photo size and video length limits.

P.S.: I've tested this script using Python 2.6.1 (and Mac OS X 10.6.8). But I guess it should run on anything with python 2.6+ (not sure about Python 3.* though).

AttachmentSize
google_photos_over_limit.py5.44 KB

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

any way to list private photos?

Thank you!

Re: any way to list private photos?

Sure. Google's API supports authentication, they suggest the use of oAuth2. If you authenticate your requests, you'll get both public and private photo data. Google even provides some client libraries that make it easy to do the oAuth authentication. I didn't incorporate this in my script, because all of my albums are public.

how do I do this on windows 8 - am newbie

how do I do this on windows 8 - ie run the script for the google photos/videos.

thanks - really looking for to this. I am over the 15GB but cannot for the life of me find the larger files/videos

I guess you enter the terms

I guess you enter the terms python windows into Google and follow the instructions ... Wink
http://bit.ly/vDNriw

I do not have Windows 8, but ...

oAuth2?

Hi,
So I know google exists but I am no developer. i can figure out how to run this script and I'll even be able to trouble shoot if I get errrors, but adding oAuth2 is a bit beyond me?

I'm even struggling finding what to google!

Could you point me in the right direction to get oAuth2 to work with your script?
Thanks!

Re: oAuth2?

It seems to me that the easiest way to use oAuth with Google APIs is by switching to Google's API Client Libraries.
The one for Python is here: https://developers.google.com/api-client-library/python/
My script used direct (HTTP) calls to the old Picasa Data API.
The API Client Libraries are (supposingly) even easier to use.