Packaging with crawl4ai and playwright not possible? #9021
Replies: 4 comments 2 replies
-
Has the browser been downloaded into playwright's package directory (presumably, You need to set |
Beta Was this translation helpful? Give feedback.
-
Thanks for the response - i checked the folder you mentioned - see below Do you see if the browser is downloaded as its needed? |
Beta Was this translation helpful? Give feedback.
-
I was now able to bundle this to a working executable - |
Beta Was this translation helpful? Give feedback.
-
Hello - i was able to reduce the size to around 300 MB (still big but better) using the following instuctions and command https://playwright.dev/python/docs/library#pyinstaller
If anybody has other suggestions pls get back to me. |
Beta Was this translation helpful? Give feedback.
-
Hello - i try to create an executable file for windows out of this code:
using the following command
pyinstaller --onefile --add-data="C:/DEVNEU/.venv/crawl4ai/Lib/site-packages/playwright_stealth/js;./playwright_stealth/js" --collect-data fake_http_header.data --collect-data fake_useragent.data test.py
When i run the python-program everthing works fine - but when i run the created exe-file i get this error:
I also tried to run this line where my playwright.exe is stored:
"C:\DEVNEU\.venv\crawl4ai\Scripts\playwright.exe" install
But i still get the same error message.
How is it possible to bundle this module as executable?
Beta Was this translation helpful? Give feedback.
All reactions