Sukushokun4 crawls URLs, take screenshots, and upload JPG(PC, smartphone) and PDF.
- Create a new project on API Console
- Enable Google Drive API
- Create a service account on Google
- Select role as editor.
- Download the credential JSON file of your service account
- One liner to minify JSON:
cat ~/Downloads/PATH_TO_SERVICE_ACCOUNT.json | ruby -rjson -e 'print JSON.dump(JSON.parse(ARGF.read))' | pbcopy
- One liner to minify JSON:
- Create a directory to store screenshots.
- Invite the service account to Google Drive's folder.
- It should looks like
***@***.iam.gserviceaccount.com
- Useful command:
cat ~/Downloads/PATH_TO_SERVICE_ACCOUNT.json | jq -r '.["client_email"]'
- It should looks like
- Create directories which has URL as a name. Sukushokun will crawl these URLs.
- Foe example:
https://example.com/
- Foe example:
% npm install
% GOOGLE_CREDENTIAL=$(cat PATH_TO_YOUR_SERVICE_ACCOUNT.JSON) npm start