0
我需要知道變量的類型,但是這是我暫時無法確定如何進行比較tweepy - >如何檢測的<class「tweepy.models.User」的類型> -
像這:
if temp== <class 'tweepy.models.Status'>:
favorited --> <type 'bool'>
contributors --> <type 'NoneType'>
truncated --> <type 'bool'>
text --> <type 'unicode'>
source_url --> <type 'str'>
possibly_sensitive --> <type 'bool'>
is_quote_status --> <type 'bool'>
in_reply_to_status_id --> <type 'NoneType'>
user --> <class 'tweepy.models.User'>
geo --> <type 'NoneType'>
id --> <type 'long'>
favorite_count --> <type 'int'>
lang --> <type 'str'>
retweeted_status --> <class 'tweepy.models.Status'>
entities --> <type 'dict'>
created_at --> <type 'datetime.datetime'>
author --> <class 'tweepy.models.User'>
retweeted --> <type 'bool'>
coordinates --> <type 'NoneType'>
in_reply_to_user_id_str --> <type 'NoneType'>
source --> <type 'str'>
in_reply_to_status_id_str --> <type 'NoneType'>
in_reply_to_screen_name --> <type 'NoneType'>
in_reply_to_user_id --> <type 'NoneType'>
extended_entities --> <type 'dict'>
place --> <type 'NoneType'>
retweet_count --> <type 'int'>
id_str --> <type 'str'>
保險很簡單,它會幫助我,如果可能的話幫助你。
謝謝。
完美,所以我解析謝謝 –