You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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