Update main function to use the -n flag for GetUserLikes

This commit is contained in:
Alessio 2023-09-01 22:33:47 -03:00
parent 0b0f1a09f2
commit 3e9bc9f4f3
2 changed files with 2 additions and 2 deletions

View File

@ -353,7 +353,7 @@ test $(sqlite3 twitter.db "select count(*) from tweets where user_id = 44067298
# Test fetching user Likes
tw fetch_user Offline_Twatter # TODO: why doesn't this work when authenticated?
tw fetch_user Offline_Twatter
tw --session Offline_Twatter get_user_likes Offline_Twatter
test $(sqlite3 twitter.db "select count(*) from likes") -ge "2"
test $(sqlite3 twitter.db "select count(*) from likes where tweet_id = 1671902735250124802") = "1"

View File

@ -288,7 +288,7 @@ func get_user_likes(handle string, how_many int) {
die(fmt.Sprintf("Error getting user: %s\n %s", handle, err.Error()), false, -1)
}
trove, err := scraper.GetUserLikes(user.ID, "") // TODO: how_many
trove, err := scraper.GetUserLikes(user.ID, how_many)
if err != nil {
die(fmt.Sprintf("Error scraping feed: %s\n %s", handle, err.Error()), false, -2)
}