Add LoginOpenAccount

Close #101 again
This commit is contained in:
Alexander Sheiko 2023-05-30 17:31:00 +03:00
parent 16e8b34638
commit e52022e31a
10 changed files with 224 additions and 34 deletions

View file

@ -79,7 +79,7 @@ import (
func main() {
scraper := twitterscraper.New()
err := scraper.Login(username, password)
err := scraper.LoginOpenAccount()
if err !== nil {
panic(err)
}
@ -183,6 +183,8 @@ func main() {
Some specified user tweets are protected that you must login and follow.
It is also required to search.
#### Login
```golang
err := scraper.Login("username", "password")
```
@ -232,6 +234,14 @@ scraper.SetCookies(cookies)
scraper.IsLoggedIn()
```
#### Open account
If you don't want to use your account, you can login as a Twitter app:
```golang
err := scraper.LoginOpenAccount()
```
### Use Proxy
Support HTTP(s) and SOCKS5 proxy