parent
66780eb801
commit
b2a9b3c722
1 changed files with 10 additions and 0 deletions
10
README.md
10
README.md
|
|
@ -64,6 +64,8 @@ func main() {
|
||||||
|
|
||||||
### Search tweets by query standard operators
|
### Search tweets by query standard operators
|
||||||
|
|
||||||
|
Now the search only works for authenticated users!
|
||||||
|
|
||||||
Tweets containing “twitter” and “scraper” and “data“, filtering out retweets:
|
Tweets containing “twitter” and “scraper” and “data“, filtering out retweets:
|
||||||
|
|
||||||
```golang
|
```golang
|
||||||
|
|
@ -77,6 +79,10 @@ import (
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
scraper := twitterscraper.New()
|
scraper := twitterscraper.New()
|
||||||
|
err := scraper.Login(username, password)
|
||||||
|
if err !== nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
for tweet := range scraper.SearchTweets(context.Background(),
|
for tweet := range scraper.SearchTweets(context.Background(),
|
||||||
"twitter scraper data -filter:retweets", 50) {
|
"twitter scraper data -filter:retweets", 50) {
|
||||||
if tweet.Error != nil {
|
if tweet.Error != nil {
|
||||||
|
|
@ -139,6 +145,10 @@ import (
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
scraper := twitterscraper.New().SetSearchMode(twitterscraper.SearchUsers)
|
scraper := twitterscraper.New().SetSearchMode(twitterscraper.SearchUsers)
|
||||||
|
err := scraper.Login(username, password)
|
||||||
|
if err !== nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
for profile := range scraper.SearchProfiles(context.Background(), "Twitter", 50) {
|
for profile := range scraper.SearchProfiles(context.Background(), "Twitter", 50) {
|
||||||
if profile.Error != nil {
|
if profile.Error != nil {
|
||||||
panic(profile.Error)
|
panic(profile.Error)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue