Giter Club home page Giter Club logo

gphotos-upload's People

Contributors

eshmu 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

gphotos-upload's Issues

Upload does not include photo Description/Caption

Regarding eshmu's upload.py, line 160:
create_body = json.dumps({"albumId":album_id, "newMediaItems":[{"description":"","simpleMediaItem":{"uploadToken":upload_token.content.decode()}}]}, indent=4)

I am trying to upload JPGs to Google Photos with a description. However, when I set the description, this field is entirely ignored by Google Photos:
create_body = json.dumps({"albumId":album_id, "newMediaItems":[{"description":"THIS TEXT IS IGNORED","simpleMediaItem":{"uploadToken":upload_token.content.decode()}}]}, indent=4)

How can this very helpful python script be modified to include the photo captions?
This is the issue to be addressed (but in python):
https://stackoverflow.com/questions/72639040/programmatically-set-a-google-photos-caption

Thank you!

Automatic auth flow not working

When I specify --auth option with file, refresh token is None and because of that auth flow without browser doesn't work. How can I fix this to work in cron job?

Can you add some examples of the command please?

I am running it and it shows me all my albums, and opens a new one (even if this name already exists),

  1. if I don't use album_name, will it take the folder's name?
  2. can I make it go through a folder of a few folders somehow?
    or should I use an external script to do that loop?

thanks!

thanks!

upload.py does nothing when run

$ python -m venv venv
$ source venv/bin/activate
$ pip install google-auth-oauthlib

I followed directions to get the client_id and client_secret and inserted that into my client_id.json file.
I then try to upload a photo to an existing album:

$ python ./upload.py --album "EXISTING_ALBUM" pic.jpg

and the script just sits there and doesn't do anything. I have to hit Ctrl-CI t to exit. I try adding the --log with a log file and the file is empty after I run the same command. Any suggestions?

Error while uploading video files >2GB

Uploading video files >2GB doesn't work

Error log

Traceback (most recent call last):
File "upload.py", line 206, in
main()
File "upload.py", line 196, in main
upload_photos(session, args.photos, args.album_name)
File "upload.py", line 156, in upload_photos
upload_token = session.post('https://photoslibrary.googleapis.com/v1/uploads', photo_bytes)
File "/Users/yusuf/.local/share/virtualenvs/gphotos-upload-master-Q2NAzFMA/lib/python3.7/site-packages/requests/sessions.py", line 572, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/Users/yusuf/.local/share/virtualenvs/gphotos-upload-master-Q2NAzFMA/lib/python3.7/site-packages/google/auth/transport/requests.py", line 201, in request
method, url, data=data, headers=request_headers, **kwargs)
File "/Users/yusuf/.local/share/virtualenvs/gphotos-upload-master-Q2NAzFMA/lib/python3.7/site-packages/requests/sessions.py", line 524, in request
resp = self.send(prep, **send_kwargs)
File "/Users/yusuf/.local/share/virtualenvs/gphotos-upload-master-Q2NAzFMA/lib/python3.7/site-packages/requests/sessions.py", line 637, in send
r = adapter.send(request, **kwargs)
File "/Users/yusuf/.local/share/virtualenvs/gphotos-upload-master-Q2NAzFMA/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/Users/yusuf/.local/share/virtualenvs/gphotos-upload-master-Q2NAzFMA/lib/python3.7/site-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/Users/yusuf/.local/share/virtualenvs/gphotos-upload-master-Q2NAzFMA/lib/python3.7/site-packages/urllib3/connectionpool.py", line 354, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/http/client.py", line 1229, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/http/client.py", line 1275, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/http/client.py", line 1224, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/http/client.py", line 1055, in _send_output
self.send(chunk)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/http/client.py", line 977, in send
self.sock.sendall(data)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/ssl.py", line 1015, in sendall
v = self.send(byte_view[count:])
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/ssl.py", line 984, in send
return self._sslobj.write(data)
OverflowError: string longer than 2147483647 bytes

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.