Fix 403 error
This commit is contained in:
parent
848bdfd3cf
commit
3eb86161ce
1 changed files with 1 additions and 2 deletions
3
api.go
3
api.go
|
|
@ -53,8 +53,7 @@ func (s *Scraper) RequestAPI(req *http.Request, target interface{}) error {
|
|||
return err
|
||||
}
|
||||
|
||||
// private profiles return forbidden, but also data
|
||||
if resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusForbidden {
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
return fmt.Errorf("response status %s: %s", resp.Status, content)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue