Replies: 1 comment
-
Firefox uses |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using Camoufox with Playwright in Python to automate browsing and need to specify a user data directory (--user-data-dir) for persistent sessions (e.g., login cookies). Here's a simplified code snippet.
Problem
The user_data_dir remains empty, and no files (e.g., Preferences, Cookies) are created.
One tab in the browser displays "Index of file:///..." instead of loading the intended URL.
Question
How can I ensure that Camoufox initializes and uses the user_data_dir correctly?
Why does the browser show the file index instead of navigating to the specified URL?
Code
`import asyncio
from camoufox import AsyncCamoufox
async def main():
user_data_dir = r"C:\Users\user\OneDrive\桌面\python\threads\camoufox_user_data\shop_and_nextchat_browser_backup"
if name == "main":
asyncio.run(main())
`
Beta Was this translation helpful? Give feedback.
All reactions