Skip to content

yiannakasgeorge/TwittyJar

Repository files navigation

img

TwittyJar - Twitter Advanced Search Export Tool

Export Tweets by using a Twitter Advanced Search similar UI, written in Python. This project was inspired by Jefferson Henrique's Python script at https://github.com/Jefferson-Henrique/GetOldTweets-python for getting old tweets without using the Twitter's API.

This tool offers a nice User Interface for passing search criteria and export options before executing a Twitter Search. It offers all the options that Twitter's Advanced Search tool (https://twitter.com/search-advanced?lang=eng) offers, but it can also export all results in a CSV file which can be easily converted to an Excel spreadsheet. It is capable of producing results up to 2+ years old. It is a great tool for marketeers, data analysts, CEO's and anyone else looking to get Twitter data exported in a single file.

:: Availability

  • Run directly as a Python3 script (main.py). Requirements: certifi==2018.11.29, pyquery==1.4.0, urllib3==1.25.7, PyQt5==5.13.2
  • Run on Mac OS by downloading the TwitterSearchMac.app located in the 'Dist' folder of this repo. No need for libraries. Just open the archive and run the APP!
  • Run on Windows by downloading the TwitterSearchWin.exe located in the 'Dist' folder of this repo. No need for libraries. Just open the archive and run the EXE file!
  • *The CSV exports will be stored on your desktop

:: Demo

Watch the video here

https://www.youtube.com/watch?v=lWIdSR3aVD8

How to convert the exported CSV to an Excel spreadsheet

*Instructions: https://www.youtube.com/watch?v=4a3I5oLj3JU

*The above method truncates the text following a comma (,). Instead of opening the CSV directly into Excel try the following:

  • Open a blank workbook in Excel.
  • Navigate to the "Data" tab
  • Select the "From Text" Option
  • Select the CSV file exported
  • Keep the default options in step 1 (Delimited, Start import at row 1, Unicode (UTF-8) as file origin
  • Make sure to select "Tab" in the Delimiters column in step 2
  • Select "General" in Column data form in step 3
  • Select the existing sheet when prompted to select "Where do you want to put the data"

That's it. You will notice that tweets with comma (,) are no longer being truncated.

*Using the method above, will incorrectly convert the "Poster username" context to formulas.

Select the "Poster username" column and its contents and click "Text to columns" option from the "Data" tab. Choose 'delimited' in step 1, "Tab" in step 2 and "Text" in step 3 to convert them to text. Then just clear the "=" sign from the context.

**For the "Tweet id" column , just form the cells to "Number" with zero decimal places.

:: Search Criteria

Words

  • All of these words
  • This Exact Phrase
  • Any of these words
  • None of these words
  • Any of these hashtags

Language

People

  • From these accounts
  • To these accounts
  • Mentioning these accounts

Places

  • Near this place

Dates (Get tweets from any period)

  • From this date
  • To these date

:: Export options

Exported fields

  • Tweet permalink
  • Tweet id
  • Tweet's poster (Username)
  • Tweet's posted date/time
  • Tweet's poster (Profile name)
  • Tweet's text (supports emojis)
  • Tweet's number of retweets
  • Tweet's retweet status (Yes/No)
  • Tweet's poster number of followers

Export to CSV

  • The exported CSV file can be easily converted to an excel spreadsheet by selecting the first column and using the "Text to columns" option in Excel. Use 'tabs' as the selected option for the delimiter type and change the 'Tweet id" column format to 'Number' without any decimals.

:: Contribution

Feel free to contribute to this project either by finding and resolving bugs and/or adding more features. Please make sure to follow the Contribution Guidelines.

About

TwittyJar - Twitter Advanced Search Export Tool

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages