Add SearchProfiles
Minor changes and fixes
This commit is contained in:
parent
f3597d0db6
commit
5032ecd29d
9 changed files with 268 additions and 100 deletions
23
README.md
23
README.md
|
|
@ -103,6 +103,7 @@ Options:
|
|||
* `twitterscraper.SearchLatest` - live mode
|
||||
* `twitterscraper.SearchPhotos` - image mode
|
||||
* `twitterscraper.SearchVideos` - video mode
|
||||
* `twitterscraper.SearchUsers` - user mode
|
||||
|
||||
### Get profile
|
||||
|
||||
|
|
@ -124,6 +125,28 @@ func main() {
|
|||
}
|
||||
```
|
||||
|
||||
### Search profiles by query
|
||||
|
||||
```golang
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
twitterscraper "github.com/n0madic/twitter-scraper"
|
||||
)
|
||||
|
||||
func main() {
|
||||
scraper := twitterscraper.New().SetSearchMode(twitterscraper.SearchUsers)
|
||||
for profile := range scraper.SearchUsers(context.Background(), "Twitter", 50) {
|
||||
if profile.Error != nil {
|
||||
panic(profile.Error)
|
||||
}
|
||||
fmt.Println(profile.Name)
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Get trends
|
||||
|
||||
```golang
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue