Coder Social home page Coder Social logo

nicholasdawson / archiverforgooglephotos Goto Github PK

View Code? Open in Web Editor NEW
179.0 10.0 25.0 154.92 MB

A tool to maintain an archive/mirror of your Google Photos library for backup purposes.

License: GNU General Public License v3.0

Python 100.00%
google-photos google-photos-api google python3 archiver downloader backup python cli photos

archiverforgooglephotos's Introduction

archiverforgooglephotos's People

Contributors

dependabot[bot] avatar github-actions[bot] avatar gligoran avatar juliusjacobsohn avatar nicholasdawson avatar snuggle avatar yrnehli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

archiverforgooglephotos's Issues

Reporting all photos downloaded, but this is not true

FROM @onupirat

I'm getting an error (see the attached screenshot) when it downloads the photos from one of my accounts. As you can see in the screenshot it shows an error, but after the error it shows it downloaded all the photos, but it's not true. It downloaded only the photos until this error. Is it possible to find the file that caused the error?
Screenshot_51

Library folder is empty after a Connection aborted error

Ran code cloned from git, with all default settings (python3 gparch_cli.py) on Linux.
Favorites, Albums and Shared albums downloaded succesfuly, and while downloading Library, in the middle of it I got an error:
Reading Entire Library From Server...
Downloading Library: 47% 57515/123124 [34:57<52:55, 20.66 media items/s]
ERROR: media item could not be downloaded because: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
Downloading Library: 100% 123124/123124 [1:13:08<00:00, 28.06 media items/s]
βœ” Finished Downloading Everything.

However the Library folder is empty.
image

Checked the debug files, and media_items_list.json items have correct url's which I can open in a browser.
Thank you for the wonderful tool, can you help me with this issue?

Process gets killed when downloading large file (probably memory issues)

For whatever reason I have a large (~1GB) file in my google photos from something I downloaded to keep myself occupied on a long train journey. I'm running the download on my Raspberry Pi 4 as I have it set up as a NAS and want to save my photos to the HDD I have connected.
When downloading this file, the program starts to use more and more memory (over the course of about 10-15 minutes) until it exhausts my 4GB of RAM and gets killed with the message "Killed.". This appears to be because of the program running out of memory and getting killed by the OS (default behaviour on linux is to mercilessly kill processes which swallow up all available memory).

Log:

================================
Archiver for Google Photos (CLI)
 - By: Nick Dawson
 - GitHub @NicholasDawson
 - https://ndawson.me

Report all issues on GitHub:
https://github.com/NicholasDawson/ArchiverForGooglePhotos/issues
Version -> 2.2.0
================================
Reading Favorites List From Server...
Downloading Favorites:   0%|                                                                                              | 0/88 [00:00<?, ? media items/s] [ERROR] media item could not be downloaded because: 'exif'
Downloading Favorites:  98%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  | 86/88 [00:00<00:00, 320.88 media items/s] [ERROR] media item could not be downloaded because: 'exif'
Downloading Favorites:  98%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  | 86/88 [00:19<00:00, 320.88 media items/s]Killed

Geolocation metadata

Hello.

Thanks for this great tool.

2 things:

  • The .exe file is set up to download only the favorites. Can this be modified to download all albums?
  • There is no metadata for geolocation that is really important to me. Is there any additional resource you recommend?

Thanks in advance

Instructions on how to generate the .exe file

What tool did you use to generate the .exe file? I tried pyinstaller but seems to require some extra configuration. If you used the same tool, did you have to add anything to the .spec file for resolving dependencies?

PhotosAccount.list_albums(): KeyError: 'albums'

7f581a5b-3138-46bb-bc6e-ab968adef98d
This was submitted by a user and needs to be investigated as to why this could be happening.

Some possible fixes would be to add better debugging and add exceptions for this type of error to find the cause.

Exe stops right after starting

Followed the instructions, everything seemed fine, but the exe doesn't start downloading.
Managed to time this screenshot just right, before it quits.

image
image

Can't download because destination is deleted?

I've succesfully downloaded an album, and I later deleted it from the local hard drive.
When I run the downloader again, it cannot re-download the files, giving the error:

image

My expected behavior would be that if the target image (probably in the database) is missing, then re-download it.

Please note that there is a workaround: if I manually create the deleted directory, then the archiver downloads the photos in it.

Unable to Run to get all Albums or Photos

Hello,

I have no problem downloading favorites or shared albums, however when I attempt to download albums or photos I encounter: KerError: 'albums' for Albums, or gparch_cli: error: unrecognized arguments: Photos.

Otherwise this is a fantastic tool that does exactly what I've been looking for as Google Takeout is completely broken for me.

Exe crash

EXE file closes right after i open it.

EDIT: Reinstalled python, everything works.

Down

Hi, I managed to download everything and it seems (judging by the size) the photos have been added to the SQLite Photo library, however, when I open Photos I see no photos. I'm using Mac Catalina (iMac).

Downloading Library: 100%|β–ˆβ–ˆβ–ˆβ–ˆ| 56569/56569 [1:01:12<00:00, 15.40 media items/s]
βœ” Finished Downloading Everything.

Program closes before making folder

After following the google slides pages, everything goes through successfully. However, after seeing the confirmation page of the authentication flow working, the program closes and no folder is made. The "photoslibrary_token.pickle" is in the directory, but nothing else is created.

Not all photos downloading

I was told my university are closing our accounts and I have a decade of photos to move off their accounts.

I was able to set in up as per the instructions but when I run the exe and let it go for a while it seems to eventually get to 100% however out of the 28,000 photos I have around 16,000 downloaded.

I'm going to try run it again but I'm not sure if there's something I need to enable or if there's a known issue here.

Anyway many thanks for this tool, it's a lifesaver for the pressure I'm under to get this stuff moved!

Download only Albums, How to download all photos from timeline?

Program download only Albums. How to download all photos from timeline?

I've got error with Shared albums too
googleapiclient.errors.HttpError: <HttpError 500 when requesting https://photoslibrary.googleapis.com/v1/sharedAlbums?pageSize=50&alt=json returned "Internal error encountered.". Details: "Internal error encountered.">

Feature: Add created date into media metadata after download

Hey, just recently installed the archiver. Works great in installing the photos in a pretty decent time as well. However after upon further examination, a lot of my photos dates are changed. I could be a complete beginner at this, so let me know if I need to do anything. Some of my recent videos are not dated back to 1969 and my photos from 2016 are dated as 2022. Thanks.

Duplicate Name Issue

I have a ton of duplicate named photos in my Google Photos account and it looks like the app just skips them. Happy to help troubleshoot this if needed.

I have attached an example.

Screenshot 2022-06-29 112855
Screenshot 2022-06-29 113016

Downloaded photo size is smaller than Google Photos Storage

Hi!

I followed the instructions and used the exe to successfully download all my photos from GPhotos but i'm noticing my downloaded size is only 75gb while GPhotos states my overall storage is 203gb?

Does this process downscale or compress the size of my photos?

Photos not downloading

I have about 62k photos in my Google Photos, after downloading all my favourites, albums and shared albums, the app downloaded about 3800 photos from my library and then stopped downloading. The progress bar suddenly started flying up very quickly but no new photos are being saved to my device and the available storage on my hard drive isn’t changing at all - it runs until completion with no errors but no additional photos are downloaded. This happened yesterday, tried again today with the same result. Happy to provide any info that might be helpful! Thanks

Feature: Add media metadata after download

Hi, just recently installed the archiver. Thanks for this usefull tool.
Could it be possible to add geolocation metadata to the file downloaded (in fact all metadata available in json file from the library. I saw you have already exif tools (from issue#16 comments), do you think it is possible ?
Thanks.

Google auth error

The login with google fails, you should update the call to the Google auth API.

google.auth.exceptions.RefreshError: ('invalid_grant: Bad Request', {'error': 'invalid_grant', 'error_description': 'Bad Request'})

Download loses exif data and considerable size

Image files downloaded from a Shared album

  1. file are severely compressed eg 2M instead of 8M
  2. EXIFdata - specifically GPS data - has been removed

The same file downloaded through the web has all data intact

Why is this? Can it be easily avoided?

Duplicate photo names being overwritten

Hi, thanks so much for putting this together.
While validating all my pictures downloaded, I saw that there were pictures missing randomly. When I looked into it further, it's because there were multiple files with the same filenames, and therefore the system overwrote those files. Where I should have two files named IMG_004 (with one of them being IMG_004(1)), I only have one.
I cannot sort photos by filenames on Google Photos to see what all has a duplicate name. Any suggestions?

RAW Images stored in Google Photos cannot be downloaded

It seems that raw photos from dedicated cameras that are stored in Google Photos won't be able to be downloaded as Python's pillow library doesn't seem to support them. As this is an upstream issue it might be difficult to find a fix, but it seems that most RAW formats aren't supported by Pillow and instead rawpy is usually used.

I have thousands of .arw images stored in my Google Photos which is a raw image format used by almost all Sony cameras.

Upstream Issue: python-pillow/Pillow#3124

βœ” Finished Downloading Shared Albums.

Reading Entire Library From Server...

Downloading Library:  16%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‰  | 3539/22777 [00:04<00:09, 1956.83 media items/s]
ERROR: media item could not be downloaded because: unknown file extension: .arw
ERROR: media item could not be downloaded because: unknown file extension: .arw
ERROR: media item could not be downloaded because: unknown file extension: .arw
ERROR: media item could not be downloaded because: unknown file extension: .arw
ERROR: media item could not be downloaded because: unknown file extension: .arw

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.