• This repository has been archived on 06/Jun/2021
  • Stars
    star
    263
  • Rank 155,624 (Top 4 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 9 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Upload photo to Google Photos (Unofficial).

upload-gphotos

THIS LIBRARY HAS BEEN DEPRECATED

Starting June 1, 2021, you will no longer be able to upload an unlimited number of images to Google Photos.

We are deprecating this library as it no longer fulfills its primary purpose.

If you wish to upload images to Google Photos in the future, please use the official API.


NPM

NPM VERSION GITHUB RELEASE LICENSE

Google Photos にファイルをアップロード.

Upload photos to Google Photos (Unofficial).

CAUTION | This library use an internal Google Photos API. USE AT YOUR OWN RISK

Requirement

  • Required: Chrome or Chromium
    • If you installed Chrome to custom path, set PUPPETEER_EXECUTABLE_PATH

Preparation

USE AT YOUR OWN RISK

  1. Turn on "Allowing less secure apps to access your account"
  2. (Optional) Login Google via browser if you haven't login from current IP address.

Installation

Executable file (Recommended)

Download your platform's binary via GitHub Releases.

npm

$ npm install -g upload-gphotos

Usage

$ upload-gphotos file [...] [--no-output-json] [--quiet] [-r retry] [-u username] [-p password] [-a albumname] [--aid albumid]

Library

This is also Node.js library.

const fs = require('fs');
const libpath = require('path');
const { GPhotos } = require('upload-gphotos');

const gphotos = new GPhotos();
const filepath = libpath.join(__dirname, './example.jpg');

(async () => {
  await gphotos.signin({
    username,
    password,
  });

  const album = await gphotos.searchAlbum({ title: 'TestAlbum' });

  const photo = await gphotos.upload({
    stream: fs.createReadStream(filepath),
    size: (await fs.promises.stat(filepath)).size,
    filename: libpath.basename(filepath),
  });

  await album.append(photo);

  console.log(photo);
})().catch(console.error);

FAQ

  • Q. Why not using Google Photos API?
  • Q. Is it support to login with SMS / 2FA / Application password?
    • A. No. I have no plan to support. See issues#196.
  • Q. I can't login, Why?
    • A. Please try to login via browser, first.
    • Google will ban to login from unknown IP.
  • Q. When uploading large / many files, Uploading was failed.
    • A. It maybe limitations of Google Photos.
    • Limitations is below. (FYI: issues#246, issues#256(comments))
      • 75 MB or 100 megapixels / 1 photo
      • 10 GB / 1 video
      • Total bandwidth maybe 10 GB / 1 day

More Repositories

1

axios-cookiejar-support

Add tough-cookie support to axios.
TypeScript
312
star
2

http-cookie-agent

Allows cookies with every Node.js HTTP clients (e.g. Node.js global fetch, undici, axios, node-fetch).
TypeScript
41
star
3

cheerio-gasify

cheerio working on Google Apps Script.
JavaScript
38
star
4

lit-date

Light-weight, faster datetime formatter for modern browsers.
JavaScript
37
star
5

node-linebot

LINE BOT API wrapper for Node.js
TypeScript
32
star
6

stylelint-browser-compat

Yet another linter rule to detect compatibility of CSS features.
TypeScript
24
star
7

kauntah-svg

A simple hit counter inspired by shimobayashi/kauntah.
JavaScript
15
star
8

wasm-zip-extractor-app

JavaScript
11
star
9

blurhash-sw

The BlurHash API provided by ServiceWorker.
TypeScript
9
star
10

memi

Simple task-runner with JavaScript
JavaScript
9
star
11

the-camera

The camera powered by modern browser PWA
JavaScript
7
star
12

babel-plugin-polyfill-custom

Yet another babel plugin that lets you freely customize polyfills.
TypeScript
5
star
13

smtp2slack

The system forwarding email to slack.
JavaScript
4
star
14

docker-ngrokd

Make your private ngrok with docker-compose.
3
star
15

template-thesis

卒論書くときに使った Paperist / LaTeX テンプレート
TeX
3
star
16

sauce-han-fonts

醤ノ角ゴシック / 醤ノ明朝 ( Japanese TrueType fonts converted from Source Han Sans / Source Han Serif. )
3
star
17

SUSH

Simple URL Shortener (can be provided from a static HTML server)
TypeScript
3
star
18

dockerfile-mailserver

Dockerfile to make mailserver powered by postfix / dovecot .
Shell
3
star
19

configs

JavaScript
2
star
20

bmp

Create a BMP (w/ alpha channel) binary from RGBA raw bytes like ImageData.
JavaScript
2
star
21

http-signature

Create / Verify HTTP Signatures (https://tools.ietf.org/html/draft-cavage-http-signatures-10)
TypeScript
2
star
22

portfolio

TypeScript
2
star
23

rpgmv-save-store-proxy

[DO NOT WORK] RPGツクールMVで作られたゲームのセーブデータを保管して, どの端末でも同じセーブデータを使えるようにします.
JavaScript
2
star
24

waifu2x-matlab

very slow.
MATLAB
1
star
25

HeyMeijiSystem

Chrome Extension for Oh-o!MeijiSystem.
JavaScript
1
star
26

github-repo-manager-with-react

GitHub Repositories Manager with React.
TypeScript
1
star
27

docker-nginx-omniauth-adapter

Docker image Slack/GitHub auth adapter using sorah/nginx_omniauth_adapter.
Ruby
1
star
28

passport-annict

TypeScript
1
star
29

stylelint-yet-another-no-restricted-syntax

Yet another stylelint rule to disallow specified syntax, similar to ESLint no-restricted-syntax.
1
star