Skip to content

Commit

Permalink
fix media type
Browse files Browse the repository at this point in the history
  • Loading branch information
vladkens committed Oct 6, 2024
1 parent 3d8f2c6 commit ae75f9f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ async def main():
await gather(api.subscriptions(user_id, limit=20)) # list[User]
await gather(api.user_tweets(user_id, limit=20)) # list[Tweet]
await gather(api.user_tweets_and_replies(user_id, limit=20)) # list[Tweet]
await gather(api.user_media(user_id, limit=20)) # list[Tweet]

# list info
list_id = 123456789
Expand Down Expand Up @@ -241,7 +242,7 @@ twscrape tweet_replies TWEET_ID --limit=20
twscrape retweeters TWEET_ID --limit=20
twscrape user_by_id USER_ID
twscrape user_by_login USERNAME
twscrape user_media USERNAME
twscrape user_media USER_ID --limit=20
twscrape following USER_ID --limit=20
twscrape followers USER_ID --limit=20
twscrape verified_followers USER_ID --limit=20
Expand Down
2 changes: 1 addition & 1 deletion twscrape/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ class Tweet(JSONTrait):
cashtags: list[str]
mentionedUsers: list[UserRef]
links: list[TextLink]
media: "Media"
viewCount: int | None = None
retweetedTweet: Optional["Tweet"] = None
quotedTweet: Optional["Tweet"] = None
Expand All @@ -189,7 +190,6 @@ class Tweet(JSONTrait):
source: str | None = None
sourceUrl: str | None = None
sourceLabel: str | None = None
media: Optional["Media"] = None
card: Union[None, "SummaryCard", "PollCard", "BroadcastCard", "AudiospaceCard"] = None
possibly_sensitive: bool | None = None
_type: str = "snscrape.modules.twitter.Tweet"
Expand Down

0 comments on commit ae75f9f

Please sign in to comment.