()
| 66 | print(result.markdown[:500]) # Print first 500 characters |
| 67 | |
| 68 | async def use_proxy(): |
| 69 | print("\n--- Using a Proxy ---") |
| 70 | print( |
| 71 | "Note: Replace 'http://your-proxy-url:port' with a working proxy to run this example." |
| 72 | ) |
| 73 | # Uncomment and modify the following lines to use a proxy |
| 74 | # async with AsyncWebCrawler(verbose=True, proxy="http://your-proxy-url:port") as crawler: |
| 75 | # result = await crawler.arun( |
| 76 | # url="https://www.nbcnews.com/business", |
| 77 | # bypass_cache=True |
| 78 | # ) |
| 79 | # print(result.markdown[:500]) # Print first 500 characters |
| 80 | |
| 81 | async def capture_and_save_screenshot(url: str, output_path: str): |
| 82 | async with AsyncWebCrawler(verbose=True) as crawler: |
no outgoing calls
no test coverage detected
searching dependent graphs…