claabs / epicgames-freegames-node

Automatically login and find available free games the Epic Games Store. Sends you a prepopulated checkout link so you can complete the checkout after logging in. Supports multiple accounts, login sessions, and scheduled runs.
https://hub.docker.com/r/charlocharlie/epicgames-freegames
MIT License
1.33k stars 89 forks source link

A small question: Do I have to run this tool every time there's a new free game? #8

Closed nitanmarcel closed 4 years ago

nitanmarcel commented 4 years ago

Do I need to run it every time there's a new game or the tool already takes care of that by re-running every x minutes?

claabs commented 4 years ago

The script is configured to run daily by default. You can customize it with the CRON_SCHEDULE variable. https://github.com/charlocharlie/epicgames-freegames-node#environment-variables

nitanmarcel commented 4 years ago

Nice. How many times in needs to login? If I set it to every let's say 5 minutes, it will login everytime or it will remain logged?

nitanmarcel commented 4 years ago

Also epic games store is done due over usage. This error is caused by that right?

[2020-05-14 12:56:36.553 -0500] INFO  (24 on 92aed3334479): Successfully refreshed login
[2020-05-14 12:56:37.075 -0500] INFO  (24 on 92aed3334479): Available free games
    availableGames: [
      "Grand Theft Auto V"
    ]
[2020-05-14 12:56:37.569 -0500] INFO  (24 on 92aed3334479): Unpurchased free games
    purchasableGames: [
      "Grand Theft Auto V"
    ]
[2020-05-14 12:56:37.571 -0500] INFO  (24 on 92aed3334479): Purchasing Grand Theft Auto V
[2020-05-14 12:56:39.877 -0500] ERROR (HTTPError/24 on 92aed3334479): Response code 400 (Bad Request)
    HTTPError: Response code 400 (Bad Request)
        at EventEmitter.<anonymous> (/usr/app/node_modules/got/dist/source/as-promise.js:118:31)
        at processTicksAndRejections (internal/process/task_queues.js:97:5)
[2020-05-14 12:56:39.879 -0500] ERROR (24 on 92aed3334479):
    error: true
    message: "We could not confirm your purchase at this time.  Please try again later."
    syncToken: "8b8e1bcd-6dc2-4236-8141-e2a37599db32"

@charlocharlie

claabs commented 4 years ago

Yep, we're lucky it gets even that far 😄. It'll try again tomorrow, or if you have RUN_ON_STARTUP enabled, you can just restart the container when the site is back up.

nitanmarcel commented 4 years ago

Yep, we're lucky it gets even that far 😄. It'll try again tomorrow, or if you have RUN_ON_STARTUP enabled, you can just restart the container when the site is back up.

Meh, this should work =)) https://crontab.guru/#/5_*_

nitanmarcel commented 4 years ago

@charlocharlie Actually it shouldn't work since only Chromium based browsers are not working since they are blacklisted. Other ones work like charm e.g Firefox. Or even the rest library from python