Comments (7)
I had that initially: e34a5fe
The problem with storageState
instead of launchPersistentContext
was that you had to login again much sooner.
I don't know what launchPersistentContext
saves besides cookies that's relevant here.
Maybe it refreshes the cookies every time but storageState
only stores them when the browser exits successfully.
from free-games-claimer.
The issue with using
userDataDir
is that, we can't use more than 1 account. It would be nice to make it so it can collect multiple accounts at once, but it is hard to dockerize.
Could make the directory an option and have a userDataDir
for each user.
The storageState
was some json
file containing the cookies, so it wouldn't be much different.
If the cookies only expire after a month, I think it's fine because we are collecting (and refreshing the token) every week.
I think it was more like on every start. But maybe that had to do with playwright not writing out the refreshed cookies.
I'll make a PR with storageState
added back as an additional option, then we can check.
from free-games-claimer.
I think the problem may have been that storageState
just restores cookies, but otherwise it's a fresh browser which probably has some different fingerprint they check and then ask you to login earlier than with launchPersistentContext
.
from free-games-claimer.
Hmm interesting. I think if we run it in Docker, the fingerprint should be identical.
I'll try implementing storageState
and sessionStorage
, maybe it will work - TODO.
Refs:
- https://playwright.dev/docs/auth#session-storage
- https://playwright.dev/docs/auth#reuse-authentication-state
from free-games-claimer.
Currently the script will save userDataDir to reuse next time, this is inefficient and very hard to dockerize
What's hard about it? Can't you define a shared directory?
It's working with no captcha when we disable headless, so I think this is the best approach so far.
Can you open a (draft) PR?
from free-games-claimer.
Sure, I'll make a draft PR when I finish my approach.
The issue with using userDataDir
is that, we can't use more than 1 account. It would be nice to make it so it can collect multiple accounts at once, but it is hard to dockerize. Sorry it was confusing, I edited the issue.
If the cookies only expire after a month, I think it's fine because we are collecting (and refreshing the token) every week.
from free-games-claimer.
Closing this. The whole browser profile is ~64MB and needs no extra care for cookie refresh, fingerprinting etc.
from free-games-claimer.
Related Issues (20)
- v1.6 Docker Image HOT 3
- Incorrect response on Login in epic-store HOT 7
- Notification specified in .env file not working HOT 5
- Issue with automated log in
- epicgames captcha not working HOT 14
- apprise windows error HOT 1
- epic-games captch HOT 6
- Add an option to sign out
- Inquire about Available options/variables and their default values:
- Prime gaming error
- Change on epic? HOT 3
- Container starts for 5 sec then stops without explanation HOT 1
- probleme instalation HOT 1
- Epic Games and Unreal Engine login not working HOT 1
- Count DLC
- if epig games otp key isnt null check other auth ways on 2fa
- How to run "SHOW=1 node epic-games" on a Windows CMD HOT 1
- Stuck at "Current free game: Fallout 76 (XBOX)" HOT 2
- Epic-Games: failed: page.fill: Timeout 180000ms exceeded. HOT 1
- Exception when trying to claim games from Epic HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from free-games-claimer.