use env variable for scraper

This commit is contained in:
pluja 2024-02-10 13:50:24 +01:00
parent 2a26a3d35b
commit b02cb1502a

View File

@ -25,7 +25,7 @@ type ScraperResponse struct {
func GetBody(url string) (string, error) {
// Send a GET request to os.Getenv("SCRAPER_API_URL")/scrap?url=url
// Unmarshal the response and return the HTML content
scraper_api := utils.Getenv("SCRAPER_API_URL", "http://localhost:3011")
scraper_api := utils.Getenv("CRAWLER_API_URL", "http://localhost:3011")
// Request the HTML content
resp, err := http.Get(fmt.Sprintf("%v/scrap?url=%v", scraper_api, url))