This article covers a free command line Twitter profile analyzer tool. This tool is actually a Python script where you can input a Twitter username and get detailed analysis on that profile in the output. With this tool, you can get a user’s average per hour & per day tweet activity, devices used, timezone, most used hashtags, retweets & mentions, language used for the Twitter interface, and more. After getting the analysis, you can export the output to a folder, get results as a JSON file, and save user’s tweets sorted in chronological order.
This is a very practical tool that can be used for various purposes. It can be used for research on popular figures and see what people are talking about. Social media marketers can use it to analyze the profile of influences to under their fan base. So, let’s dive in and check out this free tool in details.
How To Analyze Twitter Profile via Command Line?
Tweets Analyzer is a Python script that analyzes a Twitter profile by evaluating it’s tweets, retweets, mentions, used hashtags, and other information. In order to use this script, you need a Twitter API which you can request here. Then, you need Python 2.7 or later installed and set up on your system. Once you have that, you can download the Tweets Analyzer tools using this link from it’s GitHub page. This provides you a ZIP file which gives you following files upon extraction:
This python script requires several packages to work. You can find a list of those packages in the requirements.txt file. You can install those packages with the following command:
pip install -r requiremnts.txt
Note: Open the command prompt in the same folder where you extracted the Tweets Analyzer files.
In case you have an error while installing the package, you can try installing each package individually using the following command:
pip install -r <package name>
After that, update the secrets.py file with your API information which you requested from your Twitter account. Once, all done, you can run this Python script to get the analysis on a Twitter user using the following command:
tweets_analyzer.py -n <username>
When you run the above-mentioned command, within a minute, you will get a detailed analysis on that Twitter account. First, it shows you what information is available. Then, it gives you a daily activity distribution (per hour) and a weekly activity distribution (per day) of that user based on the last 1000 tweets.
This command also shows you the languages used along with a list of devices used to access that account. All this information is accompanied by the top 10 hashtags, top 5 retweets, top 5 mentions, and most referenced domains by that account.
This script has many options to customize the analysis. You can add an option at the end of the command to get customized results. It has options to filter the tweets by a specific device, limit the number of tweet for analysis, remove timezone, export result to a file, save tweets, get output in JSON, and more. You can see all the available options here.
Here is the command syntax for the options:
tweets_analyzer.py -n <username> [options]
tweets_analyzer.py -n elonmusk -s
Tweets Analyzer is a handy tool to easily get tweets based analysis on any Twitter user who has/her tweets public. It gives you detailed analysis on that user’s Twitter account based on his/her tweets and other Twitter activities.