ani
ani

Reputation: 109

Download full size/original image size from Google Picasa Web Album API

I am trying to download original full image size from Google +.

import gdata.photos.service
import gdata.media
import gdata.geo

gd_client = gdata.photos.service.PhotosService()
username = 
album_id = 
photos = gd_client.GetFeed(
    '/data/feed/api/user/%s/albumid/%s?kind=photo' % (
        username, album_id))
first_entry = photos.entry[0]

first_entry.size returns the proper size(original image). But first_entry.content.src returns URL which is not the original resolution and size.

This link and this one gives something relevant. But they are not original image size you would get by clicking the 'Download Photo' on the picture preview.

But even first_entry.media.content[0].url as the links above suggests, it is not the original size of the image.

I followed this link: Google Picasa Web Album API

Upvotes: 2

Views: 1503

Answers (1)

Barney Flint
Barney Flint

Reputation: 41

I implemented the following ...

def GetUserFeedHiRes(self, factory, kind='album', user='default', limit=None):
  uri = "/data/feed/api/user/%s?kind=%s&imgmax=d" % (user, kind)
  gd_client=factory.GetPhotoService()
  return gd_client.GetFeed(uri, limit=limit)

looking at the code in your question, you simply need to add the &imgmax=d component

Upvotes: 4

Related Questions