Twarc

Latest version: v2.14.0

Safety actively analyzes 638396 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 16 of 22

1.5.1

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.

1.5.0

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.

1.4.7

A bugfix release for the `csv-excel` output format.

1.4.5

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

1.4.4

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

1.4.3

Español

Thanks to Tina Figueroa tinafigueroa the Twarc documentation has been translated into [Spanish](https://github.com/DocNow/twarc/blob/master/README_es_mx.md)!! 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.

Page 16 of 22

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.