improve SetAuthToken input

This commit is contained in:
Valentine 2024-03-09 18:26:46 +03:00
parent 868b87b02a
commit e6d6dc71a9
4 changed files with 18 additions and 10 deletions

View file

@ -125,8 +125,10 @@ f.Write(data)
### Using AuthToken
`SetAuthToken` method simply set required cookies `auth_token` and `ct0`.
```golang
scraper.SetAuthToken(authToken, ct0)
scraper.SetAuthToken(twitterscraper.AuthToken{Token: "auth_token", CSRFToken: "ct0"})
if !scraper.IsLoggedIn() {
panic("Invalid AuthToken")
}