mirror of
https://codeberg.org/pluja/kycnot.me
synced 2025-02-08 19:28:26 -05:00
use env variable for scraper
This commit is contained in:
parent
2a26a3d35b
commit
b02cb1502a
@ -25,7 +25,7 @@ type ScraperResponse struct {
|
|||||||
func GetBody(url string) (string, error) {
|
func GetBody(url string) (string, error) {
|
||||||
// Send a GET request to os.Getenv("SCRAPER_API_URL")/scrap?url=url
|
// Send a GET request to os.Getenv("SCRAPER_API_URL")/scrap?url=url
|
||||||
// Unmarshal the response and return the HTML content
|
// 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
|
// Request the HTML content
|
||||||
resp, err := http.Get(fmt.Sprintf("%v/scrap?url=%v", scraper_api, url))
|
resp, err := http.Get(fmt.Sprintf("%v/scrap?url=%v", scraper_api, url))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user