twitter-past-crawler

Description

The official twitter API as of now is very limiting in the access it provides to past tweets. This crawler attempts to provide users the ability to collect past tweets beyond those limitations. This is done by emulating the infinite scroll on the search page.

Requirements

The following packages are required:

Installation

$ pip install twitterpastcrawler

Usage

See samples/ for more examples. Below is an example of how to use this crawler:

import twitterpastcrawler

crawler = twitterpastcrawler.TwitterCrawler(
                            query="#haiku", # searches for tweets that respond to the query, "#haiku"
                            output_file="haiku.csv" # outputs results to haiku.csv
                        )

crawler.crawl() # commences the crawl

The following attributes can be specified upon initialization:

See the following link for information regarding the search API of twitter: https://dev.twitter.com/rest/public/search

License

Copyright (c) 2017 by Keita Kurita Released under the MIT license https://opensource.org/licenses/mit-license.php