Coder Social home page Coder Social logo

steam-screenshot-backup-tool's Introduction

steam-screenshot-backup-tool

A backup tool for Steam screenshots.

Usage

Have Node v10 or later installed. Using the latest LTS version is recommended.

git clone https://github.com/Salies/steam-screenshot-backup-tool # or download the zip
cd steam-screenshot-backup-tool
npm install
node app.js

If the program ever crashes for some reason - it may happen, for instance, when the screenshot data is being fetched - just cancel the operation and start again. The tool is configured to always pick up where it left.

Todo list:

  • Name the files according to the date they were created (like Steam names it when the screenshots are created).

steam-screenshot-backup-tool's People

Contributors

dependabot[bot] avatar gyunter avatar salies avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

hpitas djbeadle

steam-screenshot-backup-tool's Issues

UnhandledPromiseRejectionWarning (Download aborted)

Hello, thanks for all the work remaking the tool. I have tested the new version with my Steam account again. Side note: Additionally to npm I had to enter npm i piexifjs to make it work.

My results: The tool found 6100 of my 6143 pictures (123 pages). In the new version the number stays consistant, meaning, when I start the app.js a second time, it detects 6100 again and not a different number (which was a problem in the old Python version).
However, the download cancels every time after 942 pictures. In this version it is not possible for me to surpass this number of downloads by restarting the app anymore. In the Python version, the bug appeared randomly at different positions of the list, so I could restart the tool over and over again until I had the bulk of my pictures saved.
Also I don't know where the downloaded pictures in the Javascript version are located. It doesn't seem to create folders for the screenshots in the app directory.

Here is the error from the console:

Downloading DATA FOR screenshot 940 of 6100.
Data written.
Downloading DATA FOR screenshot 941 of 6100.
Data written.
Downloading DATA FOR screenshot 942 of 6100.
(node:22608) UnhandledPromiseRejectionWarning: Error: Evaluation failed: TypeError: Cannot read property 'textContent' of null
    at __puppeteer_evaluation_script__:1:30
    at ExecutionContext._evaluateInternal (C:\Users\User\steam-screenshot-backup-tool\node_modules\puppeteer\lib\ExecutionContext.js:122:13)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async ExecutionContext.evaluate (C:\Users\User\steam-screenshot-backup-tool\node_modules\puppeteer\lib\ExecutionContext.js:48:12)
    at async getScreenshotUrl (C:\Users\User\steam-screenshot-backup-tool\modules\getScreenshotUrl.js:30:22)
  -- ASYNC --
    at ExecutionContext.<anonymous> (C:\Users\User\steam-screenshot-backup-tool\node_modules\puppeteer\lib\helper.js:111:15)
    at DOMWorld.evaluate (C:\Users\User\steam-screenshot-backup-tool\node_modules\puppeteer\lib\DOMWorld.js:112:20)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
  -- ASYNC --
    at Frame.<anonymous> (C:\Users\User\steam-screenshot-backup-tool\node_modules\puppeteer\lib\helper.js:111:15)
    at Page.evaluate (C:\Users\User\steam-screenshot-backup-tool\node_modules\puppeteer\lib\Page.js:860:43)
    at Page.<anonymous> (C:\Users\User\steam-screenshot-backup-tool\node_modules\puppeteer\lib\helper.js:112:23)
    at getScreenshotUrl (C:\Users\User\steam-screenshot-backup-tool\modules\getScreenshotUrl.js:30:30)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:22608) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:22608) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Detection/downloading issues

Amazing tool, but I could only get 300 of my latest screenshots from 11 games. I have uploaded over 5000 pictures.

Download errors

Here my latest console outputs:

Downloading DATA FOR screenshot 1700 of 6100.
Data written.
Downloading DATA FOR screenshot 1701 of 6100.
(node:22968) UnhandledPromiseRejectionWarning: Error: net::ERR_SSL_BAD_RECORD_MAC_ALERT at https://steamcommunity.com/sharedfiles/filedetails/?id=786245274
    at navigate (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\FrameManager.js:120:37)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async FrameManager.navigateFrame (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\FrameManager.js:94:17)
    at async Frame.goto (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\FrameManager.js:406:12)
    at async Page.goto (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\Page.js:672:12)
    at async getScreenshotUrl (C:\Users\User\steam-screenshot-backup-tool-master\modules\getScreenshotUrl.js:22:5)
  -- ASYNC --
    at Frame.<anonymous> (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\helper.js:111:15)    at Page.goto (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\Page.js:672:49)
    at Page.<anonymous> (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\helper.js:112:23)
    at getScreenshotUrl (C:\Users\User\steam-screenshot-backup-tool-master\modules\getScreenshotUrl.js:22:13)
    at C:\Users\User\steam-screenshot-backup-tool-master\modules\getScreenshotUrl.js:59:20
    at FSReqCallback.oncomplete (fs.js:155:23)
(node:22968) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:22968) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Downloading DATA FOR screenshot 2203 of 6100.
Data written.
Downloading DATA FOR screenshot 2204 of 6100.
Data written.
Downloading DATA FOR screenshot 2205 of 6100.
(node:12216) UnhandledPromiseRejectionWarning: Error: net::ERR_SSL_BAD_RECORD_MAC_ALERT at https://steamcommunity.com/sharedfiles/filedetails/?id=853238411
    at navigate (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\FrameManager.js:120:37)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async FrameManager.navigateFrame (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\FrameManager.js:94:17)
    at async Frame.goto (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\FrameManager.js:406:12)
    at async Page.goto (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\Page.js:672:12)
    at async getScreenshotUrl (C:\Users\User\steam-screenshot-backup-tool-master\modules\getScreenshotUrl.js:22:5)
  -- ASYNC --
    at Frame.<anonymous> (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\helper.js:111:15)
    at Page.goto (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\Page.js:672:49)
    at Page.<anonymous> (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\helper.js:112:23)
    at getScreenshotUrl (C:\Users\User\steam-screenshot-backup-tool-master\modules\getScreenshotUrl.js:22:13)
    at C:\Users\User\steam-screenshot-backup-tool-master\modules\getScreenshotUrl.js:59:20
    at FSReqCallback.oncomplete (fs.js:155:23)
(node:12216) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:12216) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Downloading DATA FOR screenshot 71 of 6050.
Data written.
Downloading DATA FOR screenshot 72 of 6050.
(node:20916) UnhandledPromiseRejectionWarning: Error: Evaluation failed: TypeError: Cannot read property 'href' of null
    at __puppeteer_evaluation_script__:1:32
    at ExecutionContext._evaluateInternal (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\ExecutionContext.js:122:13)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async ExecutionContext.evaluate (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\ExecutionContext.js:48:12)
    at async getScreenshotUrl (C:\Users\User\steam-screenshot-backup-tool-master\modules\getScreenshotUrl.js:25:29)
  -- ASYNC --
    at ExecutionContext.<anonymous> (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\helper.js:111:15)
    at DOMWorld.evaluate (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\DOMWorld.js:112:20) 
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
  -- ASYNC --
    at Frame.<anonymous> (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\helper.js:111:15)    at Page.evaluate (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\Page.js:860:43)
    at Page.<anonymous> (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\helper.js:112:23)
    at getScreenshotUrl (C:\Users\User\steam-screenshot-backup-tool-master\modules\getScreenshotUrl.js:25:37)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:20916) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:20916) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Downloading DATA FOR screenshot 5568 of 6100.
Data written.
Downloading DATA FOR screenshot 5569 of 6100.
Data written.
Downloading DATA FOR screenshot 5570 of 6100.
(node:18760) UnhandledPromiseRejectionWarning: Error: Evaluation failed: TypeError: Cannot read property 'href' of null
    at __puppeteer_evaluation_script__:1:32
    at ExecutionContext._evaluateInternal (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\ExecutionContext.js:122:13)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async ExecutionContext.evaluate (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\ExecutionContext.js:48:12)
    at async getScreenshotUrl (C:\Users\User\steam-screenshot-backup-tool-master\modules\getScreenshotUrl.js:25:29)
  -- ASYNC --
    at ExecutionContext.<anonymous> (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\helper.js:111:15)
    at DOMWorld.evaluate (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\DOMWorld.js:112:20)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
  -- ASYNC --
    at Frame.<anonymous> (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\helper.js:111:15)
    at Page.evaluate (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\Page.js:860:43)
    at Page.<anonymous> (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\helper.js:112:23)
    at getScreenshotUrl (C:\Users\User\steam-screenshot-backup-tool-master\modules\getScreenshotUrl.js:25:37)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:18760) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:18760) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Downloading DATA FOR screenshot 2090 of 6100.
Data written.
Downloading DATA FOR screenshot 2091 of 6100.
(node:13324) UnhandledPromiseRejectionWarning: Error: Evaluation failed: TypeError: Cannot read property 'href' of null
    at __puppeteer_evaluation_script__:1:32
    at ExecutionContext._evaluateInternal (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\ExecutionContext.js:122:13)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async ExecutionContext.evaluate (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\ExecutionContext.js:48:12)
    at async getScreenshotUrl (C:\Users\User\steam-screenshot-backup-tool-master\modules\getScreenshotUrl.js:25:29)
  -- ASYNC --
    at ExecutionContext.<anonymous> (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\helper.js:111:15)
    at DOMWorld.evaluate (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\DOMWorld.js:112:20)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
  -- ASYNC --
    at Frame.<anonymous> (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\helper.js:111:15)
    at Page.evaluate (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\Page.js:860:43)
    at Page.<anonymous> (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\helper.js:112:23)
    at getScreenshotUrl (C:\Users\User\steam-screenshot-backup-tool-master\modules\getScreenshotUrl.js:25:37)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:13324) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:13324) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
DATA FOR screenshot 2089 of 6100 already downloaded.
DATA FOR screenshot 2090 of 6100 already downloaded.
Downloading DATA FOR screenshot 2091 of 6100.
(node:6268) UnhandledPromiseRejectionWarning: Error: Evaluation failed: TypeError: Cannot read property 'href' of null
    at __puppeteer_evaluation_script__:1:32
    at ExecutionContext._evaluateInternal (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\ExecutionContext.js:122:13)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async ExecutionContext.evaluate (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\ExecutionContext.js:48:12)
    at async getScreenshotUrl (C:\Users\User\steam-screenshot-backup-tool-master\modules\getScreenshotUrl.js:25:29)
  -- ASYNC --
    at ExecutionContext.<anonymous> (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\helper.js:111:15)
    at DOMWorld.evaluate (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\DOMWorld.js:112:20)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
  -- ASYNC --
    at Frame.<anonymous> (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\helper.js:111:15)
    at Page.evaluate (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\Page.js:860:43)
    at Page.<anonymous> (C:\Users\User\steam-screenshot-backup-tool-master\node_modules\puppeteer\lib\helper.js:112:23)
    at getScreenshotUrl (C:\Users\User\steam-screenshot-backup-tool-master\modules\getScreenshotUrl.js:25:37)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:6268) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:6268) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Stack overflow and broken screenshots error

I've been using this tool to download my big screenshot collection:
https://steamcommunity.com/id/JcJet/
There's 2 interesting bugs.
First of all, there's a stack overflow error when you resume download after it been interrupted, when reading the JSON data.

Since I know that all the data is already downloaded, and my JS skills are 0, i've just removed this part of the code. But then I've stumbled into something even more interesting, why it was interrupded in the first place. The screenshot, while not being deleted or banned, was just lost from the cloud.
https://steamcommunity.com/sharedfiles/filedetails/?id=1164759563
Well, that's just confirmes that backup tool is very much needed :)
I doubt it will reapear later because I had this issue yesterday, and now found out why it happened, so it doesn't look like a temporary server issues.
Currently, it throws 404 exception and the program stops.

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.