remove sentry and move to slog
This commit is contained in:
parent
a20bc22ab1
commit
5d2b8f39d9
18 changed files with 134 additions and 232 deletions
|
@ -3,6 +3,7 @@ package api
|
|||
import (
|
||||
"fmt"
|
||||
"golang.org/x/net/html"
|
||||
"log/slog"
|
||||
"net/http"
|
||||
"regexp"
|
||||
)
|
||||
|
@ -13,15 +14,17 @@ type GogFrontStruct struct {
|
|||
idPrefix string
|
||||
headers map[string]string
|
||||
deals DealsMap
|
||||
logger *slog.Logger
|
||||
}
|
||||
|
||||
func NewGogFrontApi() GogFrontStruct {
|
||||
func NewGogFrontApi(logger *slog.Logger) GogFrontStruct {
|
||||
gog := GogFrontStruct{
|
||||
url: "https://www.gog.com/",
|
||||
baseUrl: "https://www.gog.com/game/",
|
||||
idPrefix: "gog-",
|
||||
headers: make(map[string]string),
|
||||
deals: make(map[string]Deal),
|
||||
logger: logger,
|
||||
}
|
||||
gog.headers["Accept-Language"] = "en"
|
||||
gog.headers["User-Agent"] = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:93.0) Gecko/20100101 Firefox/93.0"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue