improve SetAuthToken input
This commit is contained in:
parent
868b87b02a
commit
e6d6dc71a9
4 changed files with 18 additions and 10 deletions
|
|
@ -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")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue