-
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
using js_code and wait_for together is broken in 0.4.22 #350
Comments
@Udbhav8 Can you share the code snippet and URL? I can't replicate this error. Please share those with me, and I will see what is causing that. Right npw the following code works well: async def main():
# Configure the browser settings
browser_config = BrowserConfig()
# Set run configurations, including cache mode and markdown generator
crawl_config = CrawlerRunConfig(
cache_mode=CacheMode.BYPASS,
page_timeout=60000,
js_code="(()=> {console.log('hi');})()",
log_console=True,
)
async with AsyncWebCrawler() 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))
if __name__ == "__main__":
asyncio.run(main()) You can check this in Colab here https://colab.research.google.com/drive/1Ge5GvHwwAgM9LtIhjjJIcLGx8VXEKq2V?usp=sharing |
@Udbhav8 Please try to send me a message by Thursday, 19 December, at 2 p.m. Singapore time. Maybe you can create an entry in the calendar using my email address, and then we can align and communicate together ([email protected]). Besides this, I also suggest that you try to manage the browser, especially for your case. I am providing you with two links to other issues where I gave very detailed answers, and I believe that will help you a lot. Finally, I really want to continue addressing this error. I want to know the situations in which the response is a non-type; that is interesting to me. Before I use an if and else statement to manage it, I need to know when that happens. |
Perfect I have sent you a meeting invite for exactly that time, I will also send you an email with the storage_state exactly at 2pm so you can look in case you aren't able to join the meet |
i have sent you an email with the storage_state object from [email protected] @unclecode |
let me know if there is another time i can send you the tokens again so we can test syncronously @unclecode |
If i pass in any js_code in the crawler it returns this error
i have also explained the issue here
I think commit
0982c63
broke thisprobably just need a null check for response in here, i fixed it right now with manually copying this file with the null check into my docker build
The text was updated successfully, but these errors were encountered: