diff --git a/novelupdates.go b/novelupdates.go index cc442eb..9da214b 100644 --- a/novelupdates.go +++ b/novelupdates.go @@ -11,7 +11,7 @@ import ( "github.com/PuerkitoBio/goquery" ) -func (api *Api) getWithCookie(ctx context.Context, url string) (*goquery.Document, error) { +func (api *Api) GetWithCookie(ctx context.Context, url string) (*goquery.Document, error) { if api.Cookie == "" { return nil, errors.New("no API cookie set") } @@ -36,7 +36,7 @@ func (api *Api) getWithCookie(ctx context.Context, url string) (*goquery.Documen return goquery.NewDocumentFromReader(r) } -func (api *Api) get(ctx context.Context, url string) (*goquery.Document, error) { +func (api *Api) Get(ctx context.Context, url string) (*goquery.Document, error) { curl := exec.CommandContext(ctx, "curl", "-s", url, "-H", fmt.Sprintf("User-Agent: %s", api.UserAgent),