From 379e99a672537776ac0e160999967b5efce29305 Mon Sep 17 00:00:00 2001 From: Harmon Date: Mon, 20 Sep 2021 18:13:14 -0500 Subject: [PATCH] Add alt_text field for Media --- tweepy/media.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tweepy/media.py b/tweepy/media.py index 6021e70..4920b2e 100644 --- a/tweepy/media.py +++ b/tweepy/media.py @@ -10,7 +10,7 @@ class Media(DataMapping): __slots__ = ( "data", "media_key", "type", "duration_ms", "height", "non_public_metrics", "organic_metrics", "preview_image_url", - "promoted_metrics", "public_metrics", "width" + "promoted_metrics", "public_metrics", "width", "alt_text" ) def __init__(self, data): @@ -26,6 +26,7 @@ class Media(DataMapping): self.promoted_metrics = data.get("promoted_metrics") self.public_metrics = data.get("public_metrics") self.width = data.get("width") + self.alt_text = data.get("alt_text") def __eq__(self, other): if isinstance(other, self.__class__): -- 2.25.1