Skip to content

Releases: DocNow/twarc

v1.5.1

06 Aug 15:12
Compare
Choose a tag to compare

Bugfix release to get documentation displaying correctly on PyPI. I had bundled with an old version of pip that didn't handle Markdown upload w/ twine properly.

v1.5.0

06 Aug 14:44
Compare
Choose a tag to compare

This release includes several contributions from @SamHames to better handle usage of twarc as a library, such as fetching user timelines, and handling keepalive events for streaming endpoints.

v1.4.7

06 Jul 11:46
Compare
Choose a tag to compare

A bugfix release for the csv-excel output format.

v1.4.5

16 May 10:12
Compare
Choose a tag to compare

A bugfix release to correct a misspelled column heading in CSV output.

v1.4.4

24 Apr 18:00
Compare
Choose a tag to compare

Bugfix release for CSV output when designating a file under Python 2. See #221 for context.

v1.4.3

21 Apr 19:11
Compare
Choose a tag to compare

v1.4.3 release includes three new features:

Español

Thanks to Tina Figueroa @tinafigueroa the Twarc documentation has been translated into Spanish!! Hopefully this will open up twarc and DocNow to new communities of users worldwide. Thanks also to @kayiwa for the assist.

Configure

Unless you tell it to do otherwise twarc's configuration is found at $HOME:.twarc and it contains a set of profiles that contain that API keys to use when talking to the Twitter API. Previously you could only run twarc configure to add the initial profile, and subsequent profiles needed to be added manually with a text editor.

With this release you can repeatedly call configure if you want to add new profiles. In addition it will only prompt you for the Twitter application's consumer key and consumer secret and will give you a URL to visit in your browser to grant user access to the application.

This is useful in situations where you want to easily reuse the same application but with different user accounts. It's also handy in instructional settings where the instructor may want to create an application for class and give the keys to students who will not be required to link their Twitter account to their cell phone. In those situations it's a good idea to delete the application after the instruction has completed.

Here's what it looks like on the console:

Twarc needs to know a few things before it can talk to Twitter on your behalf.

Please enter your Twitter application credentials from apps.twitter.com:

consumer key: VYhiNthiswontworksL7yjho8Vg
consumer secret: S8tanL6o7A4hNneitherwillthisqPCjSR2Z6NfZrAHfhWA0

Please log into Twitter and visit this URL in your browser:
https://api.twitter.com/oauth/authorize?oauth_token=mlZQowblahblahblahMHkpAAABYumdhl4

After you have authorized the application please enter the displayed PIN: 7814642

The credentials for edsu have been saved to your configuration file at /Users/edsu/.twarc

✨ ✨ ✨  Happy twarcing! ✨ ✨ ✨

Protected

It appears that Twitter's search and streaming APIs do not return protected tweets even if the authenticating user is entitled to see them. This is a good thing, but rather than relying on this undocumented behavior v1.4.3 will inspect all tweet and user objects and filter out protected ones unless twarc was specifically asked to not do that. You can use the --protected to control this. By default it is set to false, which filters out protected tweets.

v1.4.0

04 Mar 15:04
4df784c
Compare
Choose a tag to compare

v1.4.0 adds a new output format csv-excel that modifies some of the columns to prevent newlines from being present in quoted strings. While it's valid to have newlines within quoted column values, they cause some problems for Excel. Thanks to @justinlittman for diagnosing and resolving the issue.

v1.3.5

05 Feb 09:59
Compare
Choose a tag to compare

This bugfix release fixes an install problem on Windows that was causing the twarc.py command line to fail to execute. It also includes a fix for not often used subcommands like places that were failing because they weren't encoding JSON properly.

v1.3.4

18 Dec 11:33
Compare
Choose a tag to compare

A small bugfix release to correct a missing import.

v1.3.1

28 Nov 16:59
Compare
Choose a tag to compare

This release brings CSV output to twarc.

twarc search blacklivesmatter --format csv > blacklivematter.csv

If you prefer you can output directly to a named file:

twarc search blacklivesmatter --format csv --outupt blacklivesmatter.csv

You can also split the output across numbered files if you want. For example this will rotate files every 10,000 rows:

twarc search blacklivesmatter --format csv --split 10000 --output blacklivesmatter.csv

Which will write files like:

blacklivesmatter-001.csv
blacklivesmatter-002.csv
blacklivesmatter-003.csv
...