-
-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] Is there anyway to load cookies? #29
Comments
Also I saw a Discord generator made by you and I have a question, why is it not working? Is the problem with the generator or the captcha-solver? I'm interested because I want to make a bot that enters discord servers with already existing accounts. |
You can add cookies via This Repository is not connected to Dislock (the Discord Generator), if you have any questions about it, open an issue there. |
@Vinyzu but the temp dir is always different: Botright/botright/playwright_mock/browser.py Lines 80 to 95 in f842900
in our case we need to persist the user data so that they can use the same session in the future how can we do that w/o changing source code of Botright? |
We also need to disable default PDF preview so that these files get downloaded natively: preference = {
"plugins": {
"always_open_pdf_externally": True,
"open_pdf_in_system_reader": True,
},
}
user_data_dir = [our directory]
preference_dir = os.path.join(user_data_dir, "Default")
os.makedirs(preference_dir, mode=0o777, exist_ok=True)
with open(preference_dir + "/Preferences", "w") as f:
json.dump(preference, f) And this has to happen before the persistent context is launched. |
I have some Updates planned which will make botright more compatible with playwright. Im reopening for now |
In Playwright you can load cookies like that:
context = await browser.new_context(storage_state=cookie_file)
Is it possible to do in Botright? I didn't find the solution :(
The text was updated successfully, but these errors were encountered: