From c4b609a58b17e0733a3208b5b0d6a39292a86a8d Mon Sep 17 00:00:00 2001 From: ruizie Date: Fri, 28 Mar 2025 20:08:51 +0100 Subject: [PATCH] Fix KeyError legacy['can_media_tag'] in User class --- twikit/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twikit/user.py b/twikit/user.py index 5535a346..080fe531 100644 --- a/twikit/user.py +++ b/twikit/user.py @@ -106,7 +106,7 @@ def __init__(self, client: Client, data: dict) -> None: self.verified: bool = legacy['verified'] self.possibly_sensitive: bool = legacy['possibly_sensitive'] self.can_dm: bool = legacy['can_dm'] - self.can_media_tag: bool = legacy['can_media_tag'] + self.can_media_tag: bool = legacy.get('can_media_tag', False) self.want_retweets: bool = legacy['want_retweets'] self.default_profile: bool = legacy['default_profile'] self.default_profile_image: bool = legacy['default_profile_image']