Parse a retweet like a full tweet
This commit is contained in:
parent
34aae0d008
commit
c370a9078f
3 changed files with 14 additions and 19 deletions
|
|
@ -96,12 +96,18 @@ func TestGetTweet(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestRetweet(t *testing.T) {
|
||||
sample := Retweet{
|
||||
ID: "1359151057872580612",
|
||||
TimeParsed: time.Date(2021, 02, 9, 14, 43, 58, 0, time.FixedZone("UTC", 0)),
|
||||
Timestamp: 1612881838,
|
||||
UserID: "773578328498372608",
|
||||
Username: "TwitterTogether",
|
||||
sample := &Tweet{
|
||||
HTML: "We’ve seen an increase in attacks against Asian communities and individuals around the world. It’s important to know that this isn’t new; throughout history, Asians have experienced violence and exclusion. However, their diverse lived experiences have largely been overlooked.",
|
||||
ID: "1359151057872580612",
|
||||
Likes: 6683,
|
||||
PermanentURL: "https://twitter.com/TwitterTogether/status/1359151057872580612",
|
||||
Replies: 455,
|
||||
Retweets: 1495,
|
||||
Text: "We’ve seen an increase in attacks against Asian communities and individuals around the world. It’s important to know that this isn’t new; throughout history, Asians have experienced violence and exclusion. However, their diverse lived experiences have largely been overlooked.",
|
||||
TimeParsed: time.Date(2021, 02, 9, 14, 43, 58, 0, time.FixedZone("UTC", 0)),
|
||||
Timestamp: 1612881838,
|
||||
UserID: "773578328498372608",
|
||||
Username: "TwitterTogether",
|
||||
}
|
||||
tweet, err := defaultScraper.GetTweet("1362849141248974853")
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue