What is the difference between on_data and on_status in a tweepy library?

I just started using the tweepy library to connect to twitter api streaming. I came across the on_status() and on_data() methods of the on_status() class. What is the difference? All is not here!

+5
source share
2 answers

on_data() processes:

  • status responses
  • removal
  • Developments
  • direct messages
  • friends
  • limits, disconnections and warnings

whereas on_status() just processes the statuses.

source: https://github.com/tweepy/tweepy/blob/78d2883a922fa5232e8cdfab0c272c24b8ce37c4/tweepy/streaming.py

+5
source

If you are only interested in tweets, use on_status() . This will give you what you need without additional information, and it will not interfere with your restriction.

If you need more information, use on_data() . - This rarely happens if you do not conduct a heavy analysis.

+3
source

All Articles