(crawler)
| 46 | print_result(result) |
| 47 | |
| 48 | def screenshot_usage(crawler): |
| 49 | cprint("\n📸 [bold cyan]Let's take a screenshot of the page![/bold cyan]") |
| 50 | result = crawler.run(url="https://www.nbcnews.com/business", screenshot=True) |
| 51 | cprint("[LOG] 📦 [bold yellow]Screenshot result:[/bold yellow]") |
| 52 | # Save the screenshot to a file |
| 53 | with open("screenshot.png", "wb") as f: |
| 54 | f.write(base64.b64decode(result.screenshot)) |
| 55 | cprint("Screenshot saved to 'screenshot.png'!") |
| 56 | print_result(result) |
| 57 | |
| 58 | def understanding_parameters(crawler): |
| 59 | cprint("\n🧠 [bold cyan]Understanding 'bypass_cache' and 'include_raw_html' parameters:[/bold cyan]") |
no test coverage detected
searching dependent graphs…