Separate test package
This commit is contained in:
parent
55a0c83804
commit
4c9f06806a
7 changed files with 58 additions and 44 deletions
2
api.go
2
api.go
|
|
@ -23,7 +23,7 @@ func (s *Scraper) RequestAPI(req *http.Request, target interface{}) error {
|
|||
}()
|
||||
}
|
||||
|
||||
if s.guestToken == "" || s.guestCreatedAt.Before(time.Now().Add(-time.Hour*3)) {
|
||||
if !s.IsGuestToken() || s.guestCreatedAt.Before(time.Now().Add(-time.Hour*3)) {
|
||||
err := s.GetGuestToken()
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue