unclecode / crawl4ai

šŸ”„šŸ•·ļø Crawl4AI: Crawl Smarter, Faster, Freely. For AI.
https://crawl4ai.com
Apache License 2.0
17.01k stars 1.26k forks source link

Screenshot must be taken after wait_for condition is met #120

Open studio-anurag opened 1 month ago

studio-anurag commented 1 month ago

screenshot=True, takes screenshot before wait_for finishes, so on webpages where data loads later it take screenshot of empty pages.

unclecode commented 1 month ago

@studio-anurag Great catch! You're absolutely right, and Iā€™m on it. I'll update it soon, along with a few other things I got from the community. Iā€™ll update everything and release it, and this time, Iā€™ll definitely take the screenshot after waiting. I also made adjustments with the wait_for, it not only supports JavaScript expressions butĪ© also waits for the presence of elements if you pass a CSS selector. This is crucial for taking more detailed screenshots. Plus, I plan to add more parameters for screenshots; right now, itā€™s the whole page, but soon youā€™ll be able to control location, size, and even specify which part of the page you want. All that is coming soon. Thanks for the very detailed feedback, much appreciated!

studio-anurag commented 1 month ago

Great to hear back from you. I appreciate your efforts. Will be exploring more aspects. This Library is really helpful and with further enhancements is going to be even more helpful. Thanks