Closed MusTangLee closed 4 years ago
I have a workaround for automated batch claims.
Using a headless Ubuntu Server 18.04 VM I would run into X display issues when the accounts would need to be manually logged into.
So instead I setup a Lubuntu 18.04 VM with a display. It is set to auto log in on launch using the instructions here: https://askubuntu.com/questions/848110/auto-login-lxde
It has a weekly crontab that looks like this: export DISPLAY=:0 && /bin/bash /home/user/epicgames-freebies-claimer/epicgames.bash
The bash scrip it runs looks like this:
echo "-----" >> /home/user/epicgames-freebies-claimer/epicgames.log
echo "$(date)" >> /home/user/epicgames-freebies-claimer/epicgames.log
node /home/user/epicgames-freebies-claimer/gimme_free_epic_shit.js EMAIL1 PASSWORD1 >> /home/user/epicgames-freebies-claimer/epicgames.log
node /home/user/epicgames-freebies-claimer/gimme_free_epic_shit.js EMAIL2 PASSWORD2 >> /home/user/epicgames-freebies-claimer/epicgames.log
My rememberLastSession is still set to true
Log file looks like this:
-----
Tue Apr 14 04:12:01 EDT 2020
Failed to login as EMAIL1, please attempt manually.
Logged in as ACCOUNT1
Close to the Sun was already claimed for this account
Sherlock Holmes Crimes and Punishments was already claimed for this account
Lego Batman Trilogy was already claimed for this account
Logged out of Epic Games
Failed to login as EMAIL2, please attempt manually.
Logged in as ACCOUNT2
Close to the Sun was already claimed for this account
Sherlock Holmes Crimes and Punishments was already claimed for this account
Lego Batman Trilogy was already claimed for this account
Logged out of Epic Games
I have a workaround for automated batch claims.
Using a headless Ubuntu Server 18.04 VM I would run into X display issues when the accounts would need to be manually logged into.
So instead I setup a Lubuntu 18.04 VM with a display. It is set to auto log in on launch using the instructions here: https://askubuntu.com/questions/848110/auto-login-lxde
It has a weekly crontab that looks like this:
export DISPLAY=:0 && /bin/bash /home/user/epicgames-freebies-claimer/epicgames.bash
The bash scrip it runs looks like this:
echo "-----" >> /home/user/epicgames-freebies-claimer/epicgames.log echo "$(date)" >> /home/user/epicgames-freebies-claimer/epicgames.log node /home/user/epicgames-freebies-claimer/gimme_free_epic_shit.js EMAIL1 PASSWORD1 >> /home/user/epicgames-freebies-claimer/epicgames.log node /home/user/epicgames-freebies-claimer/gimme_free_epic_shit.js EMAIL2 PASSWORD2 >> /home/user/epicgames-freebies-claimer/epicgames.log
My rememberLastSession is still set to
true
Log file looks like this:
----- Tue Apr 14 04:12:01 EDT 2020 Failed to login as EMAIL1, please attempt manually. Logged in as ACCOUNT1 Close to the Sun was already claimed for this account Sherlock Holmes Crimes and Punishments was already claimed for this account Lego Batman Trilogy was already claimed for this account Logged out of Epic Games Failed to login as EMAIL2, please attempt manually. Logged in as ACCOUNT2 Close to the Sun was already claimed for this account Sherlock Holmes Crimes and Punishments was already claimed for this account Lego Batman Trilogy was already claimed for this account Logged out of Epic Games
Are you using a dedicated server or home pc? Sadly, I don't have a server readily available to run the VM and cba running a VM once a week on home pc. Could probably automate running the VM on my home Windows pc with VBoxVmService or something similar... Honestly at this point it's more alluring just fixing the rememberLastSession hardcoded issue.
Keeping your implementation in mind when I get a hold of a server. :) Thanks!
You could probably copy your implementation of weekly automated batch claims to a standalone git gist and get linked to on the README.md. Not many people will come across this here and it's quite elegant.
Feature request. Changing rememberLastSession to be an optional argument for command line AND in the config will enable running the script for multiple accounts in a batch run.
Maybe like this? : node gimme_free_epic_shit USERNAME PASSWORD false
Could also be a flag like parameter? : node gimme_free_epic_shit -r USERNAME PASSWORD
The default value in the config should probably stay true, it will streamline normal use for one account.