evadb icon indicating copy to clipboard operation
evadb copied to clipboard

`ScreenshotWebsite` Function

Open xzdandy opened this issue 1 year ago • 1 comments

Search before asking

  • [X] I have searched the EvaDB issues and found no similar feature requests.

Description

Take a screenshot for a given webpage. Relevent code:

from selenium import webdriver
from selenium.webdriver.chrome.service import Service as ChromeService

# Initialize a headless Chrome browser
chrome_service = ChromeService("/opt/homebrew/bin/chromedriver")
chrome_service.start()
driver = webdriver.Chrome(service=chrome_service)

# Navigate to the GitHub user's profile page
github_username = "acdha"
profile_url = f"[https://github.com/{github_username}](https://github.com/%7Bgithub_username%7D)"
driver.get(profile_url)

# Capture a screenshot of the user's profile
screenshot_path = "profile_screenshot.png"
driver.save_screenshot(screenshot_path)

Use case

No response

Are you willing to submit a PR?

  • [ ] Yes I'd like to help by submitting a PR!

xzdandy avatar Sep 08 '23 03:09 xzdandy

Hi, I'm planning to work on this feature for 4420 evadb project @jarulraj

^ Nevermind, heard it was already done

jkim3663 avatar Nov 13 '23 23:11 jkim3663