refactor: update browser initialization in scraper tests

This commit is contained in:
Arik Jones (aider)
2024-09-21 16:01:51 -05:00
parent de84d68b4c
commit 952c2dda02
2 changed files with 14 additions and 4 deletions

View File

@@ -339,6 +339,16 @@ func ClosePlaywright() {
}
}
// InitBrowser initializes the browser
func InitBrowser() error {
return InitPlaywright()
}
// CloseBrowser closes the browser
func CloseBrowser() {
ClosePlaywright()
}
// FetchWebpageContent retrieves the content of a webpage using Playwright
func FetchWebpageContent(urlStr string) (string, error) {
logger.Printf("Fetching webpage content for URL: %s\n", urlStr)