带有图片的 Twitter 状态,但 tweepy.API.get_status return 没有媒体
Twitter status with image, but tweepy.API.get_status return no media
我在推文中遇到了一个奇怪的问题,https://twitter.com/thesebosscats/status/1277170500729356288
当我运行api.get_status(1277170500729356288) on it, it returns no media. I tried using status_lookup([277170500729356288], include_entities=True)就可以了,不过是一样的。无媒体
这里是上面的推文
In [34]: t.entities
Out[34]:
{'hashtags': [],
'symbols': [],
'user_mentions': [],
'urls': [{'url': 'XXXXXX', # I remove because SO won't let me submit the question
'expanded_url': 'https://twitter.com/i/web/status/1277170500729356288',
'display_url': 'twitter.com/i/web/status/1…',
'indices': [117, 140]}]}
这里是完整的._json
{'created_at': 'Sun Jun 28 09:22:30 +0000 2020',
'id': 1277170500729356288,
'id_str': '1277170500729356288',
'text': "let's make a thread of black cats. i'll start by dropping my fav black cat. don't forget to drop your fav black cat… XXXXXXXX",
'truncated': True,
'entities': {'hashtags': [],
'symbols': [],
'user_mentions': [],
'urls': [{'url': 'XXXXXX', # <- I removed because SO wont let me submit the question
'expanded_url': 'https://twitter.com/i/web/status/1277170500729356288',
'display_url': 'twitter.com/i/web/status/1…',
'indices': [117, 140]}]},
'source': '<a href="http://twitter.com/download/android" rel="nofollow">Twitter for Android</a>',
'in_reply_to_status_id': None,
'in_reply_to_status_id_str': None,
'in_reply_to_user_id': None,
'in_reply_to_user_id_str': None,
'in_reply_to_screen_name': None,
'user': {'id': 1263301653953941504,
'id_str': '1263301653953941504',
'name': '',
'screen_name': 'thesebosscats',
'location': '',
'description': 'these cats will brighten up your day!',
'url': None,
'entities': {'description': {'urls': []}},
'protected': False,
'followers_count': 12808,
'friends_count': 2,
'listed_count': 57,
'created_at': 'Thu May 21 02:53:00 +0000 2020',
'favourites_count': 4,
'utc_offset': None,
'time_zone': None,
'geo_enabled': False,
'verified': False,
'statuses_count': 606,
'lang': None,
'contributors_enabled': False,
'is_translator': False,
'is_translation_enabled': False,
'profile_background_color': 'F5F8FA',
'profile_background_image_url': None,
'profile_background_image_url_https': None,
'profile_background_tile': False,
'profile_image_url': 'http://pbs.twimg.com/profile_images/1275120028476555264/FkixEbdt_normal.jpg',
'profile_image_url_https': 'https://pbs.twimg.com/profile_images/1275120028476555264/FkixEbdt_normal.jpg',
'profile_banner_url': 'https://pbs.twimg.com/profile_banners/1263301653953941504/1592847280',
'profile_link_color': '1DA1F2',
'profile_sidebar_border_color': 'C0DEED',
'profile_sidebar_fill_color': 'DDEEF6',
'profile_text_color': '333333',
'profile_use_background_image': True,
'has_extended_profile': False,
'default_profile': True,
'default_profile_image': False,
'following': False,
'follow_request_sent': False,
'notifications': False,
'translator_type': 'none'},
'geo': None,
'coordinates': None,
'place': None,
'contributors': None,
'is_quote_status': False,
'retweet_count': 496,
'favorite_count': 1709,
'favorited': False,
'retweeted': False,
'possibly_sensitive': False,
'lang': 'en'}
关于如何在这种情况下获取图像有什么想法吗?
此致,
推文数据显示 truncated: true
。这意味着您需要在 API 调用上传递 tweet_mode=extended
以检索整个数据。
我在推文中遇到了一个奇怪的问题,https://twitter.com/thesebosscats/status/1277170500729356288
当我运行api.get_status(1277170500729356288) on it, it returns no media. I tried using status_lookup([277170500729356288], include_entities=True)就可以了,不过是一样的。无媒体
这里是上面的推文
In [34]: t.entities
Out[34]:
{'hashtags': [],
'symbols': [],
'user_mentions': [],
'urls': [{'url': 'XXXXXX', # I remove because SO won't let me submit the question
'expanded_url': 'https://twitter.com/i/web/status/1277170500729356288',
'display_url': 'twitter.com/i/web/status/1…',
'indices': [117, 140]}]}
这里是完整的._json
{'created_at': 'Sun Jun 28 09:22:30 +0000 2020',
'id': 1277170500729356288,
'id_str': '1277170500729356288',
'text': "let's make a thread of black cats. i'll start by dropping my fav black cat. don't forget to drop your fav black cat… XXXXXXXX",
'truncated': True,
'entities': {'hashtags': [],
'symbols': [],
'user_mentions': [],
'urls': [{'url': 'XXXXXX', # <- I removed because SO wont let me submit the question
'expanded_url': 'https://twitter.com/i/web/status/1277170500729356288',
'display_url': 'twitter.com/i/web/status/1…',
'indices': [117, 140]}]},
'source': '<a href="http://twitter.com/download/android" rel="nofollow">Twitter for Android</a>',
'in_reply_to_status_id': None,
'in_reply_to_status_id_str': None,
'in_reply_to_user_id': None,
'in_reply_to_user_id_str': None,
'in_reply_to_screen_name': None,
'user': {'id': 1263301653953941504,
'id_str': '1263301653953941504',
'name': '',
'screen_name': 'thesebosscats',
'location': '',
'description': 'these cats will brighten up your day!',
'url': None,
'entities': {'description': {'urls': []}},
'protected': False,
'followers_count': 12808,
'friends_count': 2,
'listed_count': 57,
'created_at': 'Thu May 21 02:53:00 +0000 2020',
'favourites_count': 4,
'utc_offset': None,
'time_zone': None,
'geo_enabled': False,
'verified': False,
'statuses_count': 606,
'lang': None,
'contributors_enabled': False,
'is_translator': False,
'is_translation_enabled': False,
'profile_background_color': 'F5F8FA',
'profile_background_image_url': None,
'profile_background_image_url_https': None,
'profile_background_tile': False,
'profile_image_url': 'http://pbs.twimg.com/profile_images/1275120028476555264/FkixEbdt_normal.jpg',
'profile_image_url_https': 'https://pbs.twimg.com/profile_images/1275120028476555264/FkixEbdt_normal.jpg',
'profile_banner_url': 'https://pbs.twimg.com/profile_banners/1263301653953941504/1592847280',
'profile_link_color': '1DA1F2',
'profile_sidebar_border_color': 'C0DEED',
'profile_sidebar_fill_color': 'DDEEF6',
'profile_text_color': '333333',
'profile_use_background_image': True,
'has_extended_profile': False,
'default_profile': True,
'default_profile_image': False,
'following': False,
'follow_request_sent': False,
'notifications': False,
'translator_type': 'none'},
'geo': None,
'coordinates': None,
'place': None,
'contributors': None,
'is_quote_status': False,
'retweet_count': 496,
'favorite_count': 1709,
'favorited': False,
'retweeted': False,
'possibly_sensitive': False,
'lang': 'en'}
关于如何在这种情况下获取图像有什么想法吗?
此致,
推文数据显示 truncated: true
。这意味着您需要在 API 调用上传递 tweet_mode=extended
以检索整个数据。