0
在tweepy streamListener中,「def on_data(self,data):」和「def on_status(self,status):」有什麼區別?在tweepy streamListener中,「def on_data(self,data):」和「def on_status(self,status):」有什麼區別?
喜,在tweepy documentation 他們使用高清on_status流媒體:
import tweepy
class MyStreamListener(tweepy.StreamListener):
def on_status(self, status):
print(status.text)
但this tutorial使用高清on_data流媒體:
from tweepy import Stream
from tweepy.streaming import StreamListener
class MyListener(StreamListener):
def on_data(self, data):
的區別是什麼?
只是說明一下,當一個字段表示「在此處輸入鏈接描述」時,系統會要求您實際輸入內容,而不是僅保留默認文本;-) –