Total refactoring
Used guest frontend API BREAKING CHANGE: remove tweet.HTML property Loading more information Minor fixes and changes
This commit is contained in:
parent
1c582e142e
commit
edad8f6393
15 changed files with 628 additions and 497 deletions
|
|
@ -7,21 +7,21 @@ import (
|
|||
|
||||
func TestGetSearchTweets(t *testing.T) {
|
||||
count := 0
|
||||
maxTweetsNbr := 50
|
||||
maxTweetsNbr := 250
|
||||
for tweet := range SearchTweets(context.Background(), "twitter scraper data -filter:retweets", maxTweetsNbr) {
|
||||
if tweet.Error != nil {
|
||||
t.Error(tweet.Error)
|
||||
} else {
|
||||
count++
|
||||
if tweet.HTML == "" {
|
||||
t.Error("Expected tweet HTML is not empty")
|
||||
}
|
||||
if tweet.ID == "" {
|
||||
t.Error("Expected tweet ID is not empty")
|
||||
}
|
||||
if tweet.PermanentURL == "" {
|
||||
t.Error("Expected tweet PermanentURL is not empty")
|
||||
}
|
||||
if tweet.IsRetweet {
|
||||
t.Error("Expected tweet IsRetweet is false")
|
||||
}
|
||||
if tweet.Text == "" {
|
||||
t.Error("Expected tweet Text is not empty")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue