From a844ab23d98ce868f38d0d2b242a7ea27f466717 Mon Sep 17 00:00:00 2001 From: bakatrouble Date: Sat, 24 Apr 2021 00:30:14 +0300 Subject: [PATCH] fix twitter robot --- bots/modules/robot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bots/modules/robot.py b/bots/modules/robot.py index 1b515f5..ddc7d25 100644 --- a/bots/modules/robot.py +++ b/bots/modules/robot.py @@ -91,7 +91,7 @@ class RobotBotModuleConfig(TelegramBotModuleConfig): tweet = api.GetStatus(twitter_matches.group(1)) try: for media in tweet.media: - if media['type'] == 'video': + if media.type == 'video': max_bitrate = -1 max_bitrate_link = None for variant in media.video_unfo['variants']: