taspinar / twitterscraper

Scrape Twitter for Tweets
MIT License
2.39k stars 579 forks source link

Create Verbose flag (query_tweets) #260

Open aditya-malte opened 4 years ago

aditya-malte commented 4 years ago

Hi, Currently, running query_tweets prints a large number of logs, which sometimes crash the browser session (for eg. if you use Google Colab) especially if you are iterating over a list of keywords. Additionally, it is not exactly a pretty way to visualize progress if you are iterating over several keywords. By keeping the logger mode as a parameter (eg. verbose, etc.) rather than fixed to logger.INFO in ts.logger, we can solve this issue. Thanks

axnsantana commented 4 years ago

You can easily disable the log with:

import logging
logging.disable(logging.INFO)

ps.: This example disables INFO globally