-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
When running in docker container #354
Comments
@Jevli Hi, you're right. It's definitely a weird bug. For the second one, can you share your code snippet with me? As for the duck herd, I will check tomorrow or the day after tomorrow to see why it behaves that way. import asyncio
from crawl4ai import AsyncWebCrawler, BrowserConfig, CrawlerRunConfig, CacheMode
from crawl4ai.content_filter_strategy import PruningContentFilter
from crawl4ai.markdown_generation_strategy import DefaultMarkdownGenerator
async def main():
# Configure the browser settings
browser_config = BrowserConfig(headless=True, verbose=True)
# Set run configurations
crawl_config = CrawlerRunConfig(
cache_mode=CacheMode.BYPASS,
screenshot=True,
)
async with AsyncWebCrawler(config=browser_config) as crawler:
result = await crawler.arun(
url='https://kidocode.com/',
config=crawl_config
)
if result.success:
print("Raw Markdown Length:", len(result.markdown_v2.raw_markdown))
print("Citations Markdown Length:", len(result.markdown_v2.markdown_with_citations))
# print("Fit Markdown Length:", len(result.markdown_v2.fit_markdown))
if __name__ == "__main__":
asyncio.run(main()) And this is output
|
Dammit I think the chrome webdeveloper tools is mine. From using asyncio.gather()... removed that and got it working on outside of docker. Thought I still got problem in docker. I will paste tomorrow snippets (I don't have today more time to "clean" code :) For screenshot problem here is code which gets it: If I turn
Btw **kwargs has css_selector and extraction_strategy when I'm running it |
Update for docker, I get following error with docker file (running as should outside of docker):
I'm just ignoring something docker spefic stuff versus native... (Screenshot problem exists still also but that is both outside and inside docker) |
Hi,
When I'm running crawl4ai in docker container I get two odd errors. First one is for logger:
Also the other one:
THIS vvv IS solved view comments by me.
Problem witn asyncio.gather() when running multiple crawlers...
The text was updated successfully, but these errors were encountered: