簡體   English   中英

如何使用tweepy獲取推文的個人資料圖片

[英]How to get the profile pictures of tweets using tweepy

我正在獲取推文的描述,我只是想知道我是否可以使用tweepy api獲取推文的個人資料圖片。

這是我獲取推文的代碼

{
      'protected': False,
      'followers_count': 503785,
      'friends_count': 57994,
      'listed_count': 212,
      'created_at': 'Tue Sep 09 19:10:54 +0000 2014',
      'favourites_count': 463435,
      'utc_offset': None,
      'time_zone': None,
      'geo_enabled': True,
      'verified': False,
      'statuses_count': 105191,
      'lang': 'en',
      'contributors_enabled': False,
      'is_translator': False,
      'is_translation_enabled': False,
      'profile_background_color': 'C0DEED',
      'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png',
      'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png',
      'profile_background_tile': False,
      'profile_image_url': 'http://pbs.twimg.com/profile_images/1109808930392363008/OFM92rn__normal.jpg',
      'profile_image_url_https': 'https://pbs.twimg.com/profile_images/1109808930392363008/OFM92rn__normal.jpg',
      'profile_banner_url': 'https://pbs.twimg.com/profile_banners/2800434769/1552662493',
      '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': True,
      'default_profile': True,
      'default_profile_image': False,
      'following': None,
      'follow_request_sent': None,
      'notifications': None,
      'translator_type': 'none'
    },

答案是簡單地迭代結果和json

for x in results:
    print(x.user.profile_image_url)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM