2

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

Community
  • 1
  • 1
ani
  • 109
  • 2
  • 11

1 Answers1

4

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

  • You can also replace the /s-160-c/ by /s0/ and get the full image from the thumbnail URL. Below the thumbnail URL `https://lh3.googleusercontent.com/-xGmQ/WoE0EE/AAAAE9Ss/JUD8KFWsLpqEFqEeH9W8wCHMYCg/s160-c/654941820388673` And this is the full resolution image; `https://lh3.googleusercontent.com/-xGmQ/WoE0EE/AAAAE9Ss/JUD8KFWsLpqEFqEeH9W8wCHMYCg/s0/654941820388673` – Alex Benfica Feb 12 '18 at 06:44