update quick start example

This commit is contained in:
Valentine 2024-03-21 09:24:42 +03:00 committed by GitHub
parent e6d6dc71a9
commit 6a0f92e314
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -64,11 +64,8 @@ import (
)
func main() {
authToken := "auth_token"
ct0 := "ct0"
scraper := twitterscraper.New()
scraper.SetAuthToken(authToken, ct0)
scraper.SetAuthToken(twitterscraper.AuthToken{Token: "auth_token", CSRFToken: "ct0"})
// After setting Cookies or AuthToken you have to execute IsLoggedIn method.
// Without it, scraper wouldn't be able to make requests that requires authentication