Recent Releases of twarc

twarc - v2.14.0

What's Changed

Small fix to add missing fields for blue verified in both v1.1 and v2.

  • Add verified_type user field https://github.com/DocNow/twarc/pull/682
  • Add include_ext_is_blue_verified https://github.com/DocNow/twarc/pull/690
  • Updates to tutorial doc https://github.com/DocNow/twarc/commit/ae7a161d66e936042d9a8724d9b788c10dd656b4

Full Changelog: https://github.com/DocNow/twarc/compare/v2.13.0...v2.14.0

- Python
Published by igorbrigadir over 3 years ago

twarc - v2.13.0

What's Changed

  • bump python version to >=3.6 by @igorbrigadir in https://github.com/DocNow/twarc/pull/660
  • Updates to tutorial doc by @boyd-nguyen in https://github.com/DocNow/twarc/pull/665
  • Twarc Tutorial by @SamHames in https://github.com/DocNow/twarc/pull/558
  • Add twarc demo video by @Quiet27 in https://github.com/DocNow/twarc/pull/677
  • Add missing variants field to media by @igorbrigadir in https://github.com/DocNow/twarc/pull/679

New Contributors

  • @boyd-nguyen made their first contribution in https://github.com/DocNow/twarc/pull/665
  • @Quiet27 made their first contribution in https://github.com/DocNow/twarc/pull/677

Full Changelog: https://github.com/DocNow/twarc/compare/v2.12.0...v2.13.0

- Python
Published by edsu over 3 years ago

twarc - v2.12.0

What's Changed

  • Add additional expansions and fields for the new tweet edit related API parameters by @SamHames in https://github.com/DocNow/twarc/pull/657

Full Changelog: https://github.com/DocNow/twarc/compare/v2.11.3...v2.12.0

- Python
Published by edsu almost 4 years ago

twarc - v2.11.3

What's Changed

  • Add _twarc metadata to listlookup returned data by @SamHames in https://github.com/DocNow/twarc/pull/654

Full Changelog: https://github.com/DocNow/twarc/compare/v2.11.2...v2.11.3

- Python
Published by edsu almost 4 years ago

twarc - Release v2.11.2

This is a small bug fix release for an issue with progress bars being used incorrectly when reading data from stdin: #652.

- Python
Published by SamHames almost 4 years ago

twarc - v2.11.1

What's Changed

  • Add sort_order parameter for search api by @mirkolenz in https://github.com/DocNow/twarc/pull/645
  • Append matching rules from stream when flattening by @igorbrigadir in https://github.com/DocNow/twarc/pull/646
  • Fix bug where --max-results could not be set with --no-context-annota… by @SamHames in https://github.com/DocNow/twarc/pull/648

New Contributors

  • @mirkolenz made their first contribution in https://github.com/DocNow/twarc/pull/645

Full Changelog: https://github.com/DocNow/twarc/compare/v2.10.4...v2.11.1

- Python
Published by edsu almost 4 years ago

twarc - v2.11.0

What's Changed

  • Add sort_order parameter for search api by @mirkolenz in https://github.com/DocNow/twarc/pull/645
  • Append matching rules from stream when flattening by @igorbrigadir in https://github.com/DocNow/twarc/pull/646

New Contributors

  • @mirkolenz made their first contribution in https://github.com/DocNow/twarc/pull/645

Full Changelog: https://github.com/DocNow/twarc/compare/v2.10.4...v2.11.0

- Python
Published by edsu about 4 years ago

twarc - v2.10.4

This release contains two bug fixes:

  • A fix to the ensure_flattened function that handles valid API responses that contain errors, but no data #627
  • A fix to the v1.1 user_lookup function that raises a useful error when a string is passed, preventing the lookup of single character usernames. Thanks to @hauselin.

- Python
Published by SamHames about 4 years ago

twarc - v2.10.3

This release fixes two issues:

  • reports a meaningful error when the timeline command is called for a user that doesn't exist
  • correctly handles counts when querying for a user that doesn't exist

- Python
Published by SamHames about 4 years ago

twarc - v2.10.2

What's Changed

  • Set daemon attribute instead of using setDaemon method that was deprecated in Python 3.10. by @tirkarthi in https://github.com/DocNow/twarc/pull/617
  • Fix method name typo introduced by refactor by @SamHames in https://github.com/DocNow/twarc/pull/621

New Contributors

  • @tirkarthi made their first contribution in https://github.com/DocNow/twarc/pull/617

Full Changelog: https://github.com/DocNow/twarc/compare/v2.10.1...v2.10.2

- Python
Published by edsu over 4 years ago

twarc - v2.10.1

This fixes the issue with the searches command not handling an empty file correctly reported in #612.

- Python
Published by SamHames over 4 years ago

twarc - v2.10.0

This release adds support for:

  • all of the list related endpoints via the twarc2 lists subcommands and associated client methods.
  • the new quote tweet endpoint via the twarc2 quotes command and associated client methods.

- Python
Published by SamHames over 4 years ago

twarc - v2.9.5

This release adds a workaround for a bug in Twitter's Counts API endpoint which was resulting in the twarc2 counts command stopping prematurely. Thanks to @melaniewalsh and @SamHames for the detective work! See #602 for the story.

- Python
Published by edsu over 4 years ago

twarc - v2.9.4

This release is functionally identical to v2.9.3, which contained a bugfix for an issue with the streaming API raising an exception and stopping early.

Due to a mistake in the release process v2.9.3 wasn't deployed to PyPI. Rather than edit history to re-release that version, this new release is being made instead.

- Python
Published by SamHames over 4 years ago

twarc - v2.9.3

This version fixes a bug in the twarc2 sample command, that would cause an exception to be raised when trying to log a non-existent tweet ID.

- Python
Published by SamHames over 4 years ago

twarc - v2.9.2

This release includes new functionality to provide a User-Agent HTTP header with all Twitter API requests. For example:

twarc/2.9.2 (Darwin x86_64) CPython/3.10.1

- Python
Published by edsu over 4 years ago

twarc - v2.9.1

Updated version number.

- Python
Published by edsu over 4 years ago

twarc - v2.9.0

What's Changed

  • More badges in the readme by @igorbrigadir in https://github.com/DocNow/twarc/pull/577
  • Support likes and retweets endpoints. by @SamHames in https://github.com/DocNow/twarc/pull/588

Full Changelog: https://github.com/DocNow/twarc/compare/v2.8.3...v2.9.0

- Python
Published by SamHames over 4 years ago

twarc - v2.8.3

Fixes an issue where twarc was not correctly handling the 1 request/s rate limit for the search/all endpoint. Also includes better handling and error messages of situations when that rate limit is hit.

- Python
Published by SamHames over 4 years ago

twarc -

This release includes some improvements to how the mandatory the mandatory one second sleep between requests to the search api is handled with some of the twarc2 commands. See #575 for details.

- Python
Published by edsu over 4 years ago

twarc -

v2.8.1 includes a small update to the twarc search --help message that links to Twitter's Building Queries for Search Tweets to help users figure out what's possible.

https://developer.twitter.com/en/docs/twitter-api/tweets/search/integrate/build-a-query

- Python
Published by edsu over 4 years ago

twarc -

v2.8.0 adds some new controls for shaping the data that is returned from the Twitter API. The default behavior is for twarc to retrieve the fullest representation of a tweet by requesting all tweet, user, media, place and poll fields as well as all available expansions. This is generally good practice with twarc because it means that downstream processing of the collected data can rely on have all this data at its disposal. However there may be cases where you want to customize the data that comes back. This is not recommended practice but it could be useful in some contexts.

The following options allow you to fine tune the types of data that are requested when using the following sub-commands: search, searches, tweet, sample, hydrate, users, mentions, timeline, timelines, conversation, conversations, and stream. The options include:

--expansions TEXT Comma separated list of expansions to retrieve. Default is all available. --tweet-fields TEXT Comma separated list of tweet fields to retrieve. Default is all available. --user-fields TEXT Comma separated list of user fields to retrieve. Default is all available. --media-fields TEXT Comma separated list of media fields to retrieve. Default is all available. --place-fields TEXT Comma separated list of place fields to retrieve. Default is all available. --poll-fields TEXT Comma separated list of poll fields to retrieve. Default is all available.

These correspond to the API Fields and Expansions.

There is also --minimal-fields which requests just a minimal subset of data, and --no-context-annotations that does not include context-annotations, which allows more tweets to be fetched at one time (500 instead of 100). This also applies to the sub-commands: search, searches, tweet, sample, hydrate, users, mentions, timeline, timelines, conversation, conversations, stream.

--minimal-fields By default twarc gets all available data. This option requests the minimal retrievable amount of data - only IDs and object references are retrieved. Setting this makes --max-results 500 the default. NOTE: This argument is mutually exclusive with arguments: [--counts-only, --poll-fields, --media-fields, --expansions, --no-context- annotations, --place-fields, --user-fields, --tweet-fields].

- Python
Published by edsu over 4 years ago

twarc -

A bugfix release to apply black formatting rules.

- Python
Published by edsu almost 5 years ago

twarc -

A bugfix release to apply black formatting rules.

- Python
Published by edsu almost 5 years ago

twarc -

  • Add start-time/since-id parameters in the timeline CLI command to the timelines CLI command.
  • Ensure that sample command only writes JSON on stdout.

- Python
Published by edsu almost 5 years ago

twarc -

v2.7.0 adds a new places command to search for places and their identifiers, which can be used in search and stream queries. Even though it's still on the 1.1 endpoint the 1.1/geo/search.json API endpoint makes these place identifiers available when searching by the name, geo coordinates, or ip address.

``` Usage: twarc2 places [OPTIONS] VALUE [OUTFILE]

Search for places by place name, geo coordinates or ip address.

Options: --type [name|geo|ip] How to search for places (defaults to name) --granularity [neighborhood|city|admin|country] What type of places to search for (defaults to neighborhood) --max-results INTEGER Maximum results to return --json Output raw JSON response --help Show this message and exit. ```

There is a corresponding method twarc.client2.Twarc2.geo() method which you can use to do the lookup yourself from Python.

- Python
Published by edsu almost 5 years ago

twarc - v2.6.0

  • Adds the searches CLI command for running multiple searches from an input file
  • Makes progress reporting more accurate for commands that consume files one line at a time (users, conversations, hydrate etc)

- Python
Published by SamHames almost 5 years ago

twarc - v2.5.0

This release includes new functionality for working with Twitter's new Batch Compliance API which allow you to upload large datasets of Tweet or user IDs to retrieve their compliance status in order to determine what data requires action in order to bring your datasets into compliance.

``` Usage: twarc2 compliance-job [OPTIONS] COMMAND [ARGS]...

Create, retrieve and list batch compliance jobs for Tweets and Users.

Options: --help Show this message and exit.

Commands: create Create a new compliance job and upload tweet IDs. download Download the compliance job with the specified ID. get Returns status and download information about the job ID. list Returns a list of compliance jobs by job type and status. ```

- Python
Published by edsu almost 5 years ago

twarc - v2.4.3

- Python
Published by edsu almost 5 years ago

twarc - v2.4.2

This release ensures that the timeline, timelines, conversation and conversations commands default to a --start-time of 2006-03-21 (the first day of tweets) when being instructed to use the /tweets/search/all endpoint behind the scenese. For example when doing:

twarc2 timeline --use-search jack 

or:

twarc2 conversation --archive 21

Previously it was defaulting to the last 30 days (which is an unfortunate default set by the /tweets/search/all endpoint). Many thanks to Darren Halpin and @SamHames for identifying and fixing the issue!

- Python
Published by edsu almost 5 years ago

twarc - v2.4.1

This release includes support for requesting the new alt_text field for media from Twitter's v2 API:

https://twittercommunity.com/t/media-alt-text-field-now-available-in-twitter-api-v2/157939

- Python
Published by edsu almost 5 years ago

twarc - v2.4.0

This release includes a new dehydrate command for turning tweets into tweet id datasets.

twarc2 dehydrate tweets.jsonl > ids.txt

It also includes improvements to progress bar and user lookup behavior.

- Python
Published by edsu almost 5 years ago

twarc - v2.3.12

A bugfix release so that start-time is not inferred when searching with --archive and also using --until-id.

- Python
Published by edsu almost 5 years ago

twarc - v2.3.11

This release includes:

  • improved handling of user ids and invalid usernames when reading data using the timelines command
  • progress bar display when using the counts command
  • better date handling when using the --archive option with counts

- Python
Published by edsu almost 5 years ago

twarc - v2.3.10

This is another attempt at handling exceptions during streaming in a more straightforward way without using decorators2.catchrequestexceptions #505.

- Python
Published by edsu about 5 years ago

twarc - v2.3.9

This bugfix release adds some additional handling of exceptions for accessing streaming endpoints when running twarc2 stream and twarc2 sample. See #505 for the details.

- Python
Published by edsu about 5 years ago

twarc - v2.3.8

This bugfix release reuses twarc.decorators2.catchrequestexceptions in the context of streaming responses (twarc2 sample and twarc2 stream) that use the response.iter_lines method. Hopefully this will address #505 but it will require testing by people who continue seeing the error in the wild.

- Python
Published by edsu about 5 years ago

twarc - v2.3.7

v2.3.7 includes new functionality that adds progress bars for twarc2 commands like search, hydrate, timeline and more. These visual indications of how much data has been collected and how much there is to go are extremely useful in data collection jobs. Progress bars display by default when you instruct twarc to write output to a file (#490).

twarc-progressbar

Additionally there is new code to catch 503 Twitter API errors that have recently been occurring much more regularly (#499). Apparently a big reason for these errors was the load that requesting 500 tweets from the search/all endpoint while also asking for context annotations. Twitter recently announced they were no longer making context annotations available for requests asking for more than 100 tweets. Since it's one of twarc's design principles to maximize the representation of tweets the search command has been adjusted to default to 100 now instead of 500, at least for the time being (#504).

- Python
Published by edsu about 5 years ago

twarc - v2.3.6

A bugfix release for Twarc2.stream so that it reconnects after being instructed to disconnect, and then continues to fetch data from the stream.

- Python
Published by edsu about 5 years ago

twarc - v2.3.5

Disable running stream unit test under GitHub Actions since it returns a 400 error.

- Python
Published by edsu about 5 years ago

twarc - v2.3.4

More code to handle ChunkedEncodingError in stream as well as sample. Logging was updated to include tweet ids that have been collected.

- Python
Published by edsu about 5 years ago

twarc - v2.3.3

This release adds functionality to twarc.Twarc2 to catch any requests exception when reading from recent or all stream. See #471 for background.

- Python
Published by edsu about 5 years ago

twarc - v2.3.2

This release will hopefully allow catching of ChunkedEncodingError exceptions that have been observed intermittently in the wild. #471

- Python
Published by edsu about 5 years ago

twarc - v2.3.1

A bugfix release to allow the counts command to write to a file without using stdout redirection:

twarc2 counts blm blm.jsonl

- Python
Published by edsu about 5 years ago

twarc - v2.3.0

This release includes a new command for retrieving data from the new counts API.

``` Usage: twarc2 counts [OPTIONS] QUERY [OUTFILE]

Return counts of tweets matching a query.

Options: --since-id INTEGER Count tweets sent after tweet id --until-id INTEGER Count tweets sent prior to tweet id --start-time [%Y-%m-%d|%Y-%m-%dT%H:%M:%S] Count tweets created after UTC time (ISO 8601/RFC 3339), e.g. 2021-01-01T12:31:04 --end-time [%Y-%m-%d|%Y-%m-%dT%H:%M:%S] Count tweets sent before UTC time (ISO 8601/RFC 3339) --archive Count using the full archive (requires Academic Research track) --granularity [day|hour|minute] Aggregation level for counts. Can be one of: day, hour, minute. Default is hour. --limit INTEGER Maximum number of days of results to save (minimum is 30 days) --text Output the counts as human readable text --csv Output counts as CSV --help Show this message and exit. ```

- Python
Published by edsu about 5 years ago

twarc - v2.2.1

This release includes improved reading of users from files for the timelines subcommand, and some internal changes to the way that flattening works.

- Python
Published by edsu about 5 years ago

twarc - v2.2.0

This release adds the --exclude-retweets and --exclude-replies commands to the timeline and timelines subcommands. Behind the scenes all the source code has been reformatted using black.

- Python
Published by edsu about 5 years ago

twarc - v2.1.8

This release fixes a bug in twarc timelines when using a file of user ids instead of collected tweets #484

twarc2 timelines user-ids.txt > tweets.jsonl

Thanks @JanaLasser for the bug report!

- Python
Published by edsu about 5 years ago

twarc - v2.1.7

This release includes a bug fix for when the configuration file's directory does not exist. This functionality was accidentally removed in v2.1.5 and has been reinstated.

- Python
Published by edsu about 5 years ago

twarc - v2.1.6

This release includes some new code to handle Operational Disconnect error messages from Twitter when streaming data. twarc will log the message, sleep for 5 seconds and then attempt to reconnect.

- Python
Published by edsu about 5 years ago

twarc - v2.1.5

A bugfix release for logging CONSUMER_KEY correctly.

- Python
Published by edsu about 5 years ago

twarc - v2.1.4

The log will now include a message about where the config file has been loaded from. In addition --verbose can be used to cause more information to be logged, such as the keys that are being used to access the API. Most of the time this is probably not a good idea since it makes your keys available in a log, but it can be useful in situations where debugging error responses from the API.

- Python
Published by edsu about 5 years ago

twarc - v2.1.3

This release includes a small fix for twarc timelines to ignore empty lines. #476

- Python
Published by edsu about 5 years ago

twarc - v2.1.2

This release adds two new twarc2 subcommands:

conversations

conversations will read a file of tweets and look for any conversations they are a part of and will download the full conversation thread for them.

twarc2 conversations tweets.jsonl > conversations.jsonl

You can also give it a file of conversation_ids to download instead:

twarc2 conversations ids.txt > conversations.jsonl

timelines

Similarly timelines will read in a file of tweet ids and will download the user timeline for any user who authored the tweets.

twarc2 timelines tweets.jsonl > timelines.jsonl

You can also give it a file of user ids or usernames:

twarc2 timelines users.txt > timelines.jsonl

This functionality was first developed in the twarc-timelines plugin which has been renamed to twarc-timeline-archive because it does some extra things like writing timelines to separate directories and being able to be run on a schedule without redownloading previously downloaded data.

- Python
Published by edsu about 5 years ago

twarc - v2.1.1

Hot on the heels of v2.1.0 this bugfix release corrects the twarc2 flatten sub-command to ensure that data is both flattened and output as line oriented JSON.

- Python
Published by edsu about 5 years ago

twarc - v2.1.0

v2.1.0 removes the --flatten option from many commands in the hopes of encouraging users to mostly use the original data as retrieved from the Twitter API. The subcommand twarc2 flatten remains mostly for use in data processing pipelines that expect line oriented json where each object is a tweet:

twarc2 search blacklivesmatter | twarc2 flatten | jq .text 

The twarc.expansions.flatten() function has been updated to always return a list of tweets, and twarc.expansions.ensure_flattened() can be used to make sure data has been flattened already when processing tweet data. Since it is designed for use in twarc plugins and other pieces of software that need to work with tweets it is also available for import from twarc:

from twarc import ensure_flattened

In addition this release also includes twarc conversation for retrieving tweets from a a particular conversation thread.

- Python
Published by edsu about 5 years ago

twarc - v2.0.13

This bugfix release irons out some wrinkles that have been discovered during usage:

  • Fix for handling search responses with missing data stanza but that contain a next token for another page of results. #464
  • Stream diagnostics now to go stderr to not interfere with JSON being written to stdout. #456
  • twarc can be run from the command line as a module now: e.g. python -m twarc2 search barackobama #455
  • twarc2 command help text indicates times are UTC

- Python
Published by edsu about 5 years ago

twarc - v2.0.12

Bugfix for using --since-id.

- Python
Published by edsu about 5 years ago

twarc - v2.0.11

Added the HTTP status code when emitting a message about unparseable JSON.

- Python
Published by edsu about 5 years ago

twarc - v2.0.9

This bugfix release includes code to respect the 1 request / 1 second limit on the search/all endpoint #445 and also a fix for exceptions involving JSON decode errors #441

- Python
Published by edsu about 5 years ago

twarc - v2.0.10

This release adds the --max-results option to the search command to override the default of 100 for search/recent and 500 for search/all. See #449 for the details on why this is sometimes needed.

- Python
Published by edsu about 5 years ago

twarc - v2.0.8

Pagination should guard against responses that lack a "meta" property.

- Python
Published by edsu about 5 years ago

twarc - v2.0.7

Improved logging when error messages from Twitter are not JSON.

- Python
Published by edsu about 5 years ago

twarc - v2.0.6

When users are searching the full archive the default --start-date is set to the Twitter Epoch (2006-03-21). Without this it will default to the month prior to whatever the --end-date is, which can lead to confusion when users think they are searching everything. See #434 for context.

- Python
Published by edsu about 5 years ago

twarc - v2.0.5

This is a bugfix release to handle twarc configure when running on a brand new Ubuntu operating system as root when /root/.config doesn't exist yet. #431

- Python
Published by edsu over 5 years ago

twarc - v2.0.4

This release includes a small enhancement to allow flattening already flattened data. It should turn twarc.expansions.flatten into a no-op when given already flattened data.

- Python
Published by edsu over 5 years ago

twarc - v2.0.3

A small bugfix release to hide secret codes from terminal during configuration for demos and whatnot.

- Python
Published by edsu over 5 years ago

twarc - v2.0.2

Another bugfix release to bundle the docs/README.md with the twarc PyPI tarball so setup.py doesn't choke when people pip install twarc.

- Python
Published by edsu over 5 years ago

twarc - v2.0.1

A bugfix release that should allow twarc to be pip installable again from PyPI.

- Python
Published by edsu over 5 years ago

twarc - v2.0.0

v2.0.0 is a big effort by many to support the new Twitter v2 API. When you install twarc now you will continue to have the twarc command line as you did before, but there will be a new command twarc2 for interacting with the v2 API. Consult the documentation to see how it works!

twarc2 --help

It is worth noting that there is now documentation on ReadTheDocs and there is a new mechanism for extending the twarc2 command with plugins.

- Python
Published by edsu over 5 years ago

twarc - v1.12.1

This is a bugfix release to make sure tweet_mode is not sent in Premium and GNIP requests.

- Python
Published by edsu over 5 years ago

twarc - v1.12.0

This release adds initial support for the Gnip Full Archive premium endpoint if you are fortunate enough to have access to that. Many thanks to @epicfaace for adding the functionality and testing it.

- Python
Published by edsu over 5 years ago

twarc - v1.10.1

v1.10.1 includes option to manually enter user access token and secret during twarc configure. This is in response to several reports of users who are not given the PIN when authenticating with their app at Twitter. User access token and secret can be generated manually at https://developer.twitter.com/en/apps

- Python
Published by edsu about 6 years ago

twarc - v1.10.0

v1.10.0 changes the behavior of the command line client so that it can also fetch retweets from a file of tweet_ids.

twarc retweets ids.txt > retweets.jsonl

This is in addition to the previous behavior where it accepted a tweet id to fetch the retweets for:

twarc retweets 20 > retweets.jsonl

You can also comma separate the tweet ids on the command line if you want:

twarc retweets 20,21 > retweets.jsonl

The internal interface to the Twarc.reteets has changed to now accept an iterator of tweet ids.

```python from twarc import Twarc

twitter = Twarc()

for tweet in twitter.retweets([20, 21]): print(tweet['id_str']) # etc ``` If you have been using the retweets method in your code you will want to adjust it to pass in a list of ids rather than the bare ids.

- Python
Published by edsu about 6 years ago

twarc - v1.9.1

Some further adjustments to CSV generation to properly extract the tweet text from retweets that were fetched from the filter stream.

- Python
Published by edsu about 6 years ago

twarc - v1.9.0

Premium Search API

v1.9.0 adds new functionality that allows you to use the Twitter Premium Search API endpoints. To use the Premium Search you will need to visit the Twitter Developer Dashboard and set up an environment that is attached to one of your apps. Then you should be able to use the label for your environment in your twarc search command.

For example to use the docnowdev environment to search the 30 day endpoint you can:

twarc search blacklivesmatter --30day docnowdev > tweets.jsonl

or to search the full archive endpoint:

twarc search blacklivesmatter --fullarchive docnowdev > tweets.jsonl

Warning: Depending on your query this could quickly use up your budget! So you will likely also want to use --from_date and/or --to_date to limit the time range that you are searching. You can also use --limit to limit the total number of tweets that are retrieved.

twarc search blacklivesmatter --30day docnowdev --to_date 2013-08-01 > tweets.jsonl

If your app is only authorized for the sandbox you must use the --sandbox parameter which will alter the maximum number of tweets you will can retrieve in a request down to 100.

This functionality is also made available through the new Twarc.premium_search method.

Twitter Labs

v1.9.0 also includes some initial support for the Twitter Labs endpoints. At the moment only the sample stream is supported, but we anticipate adding more as they are requested.

twarc --app_auth labs_v1_sample > sample.jsonl

- Python
Published by edsu about 6 years ago

twarc - v1.8.5

A more user friendly error message when running twarc for the first time without doing a twarc configure first. Thanks @machawk1!

- Python
Published by edsu about 6 years ago

twarc - v1.8.4

This is a bugfix release for the CSV conversion which was not extracting tweet text from enclosed tweet objects in retweets which hold the fullest representation of the tweet text.

See #329 for context, and thanks to @harshbhatt for the bug report!

- Python
Published by edsu about 6 years ago

twarc - v1.8.3

This release includes a small change to Twarc.connect to catch read timeout errors which have been observed when using --app_auth to hydrate tweet ids.

- Python
Published by edsu over 6 years ago

twarc - v1.8.2

The twarc command catches SIGTERM so that users can ctrl-c to stop the process. But previously it did so quietly, so as not to clutter up the console with a stack trace. But being quiet can be confusing when users put twarc into the background, and then log out, which can cause SIGTERM being sent to the process.

To aid in diagnosing twarc will now log when it has received a SIGTERM message before it stops. Thanks to @mielverkerken for identifying the issue, and helping diagnose it.

- Python
Published by edsu over 6 years ago

twarc - v.1.8.1

We've seen a report of requests.exceptions.ChunkedEncodingError getting thrown occasionally. This commit catches those. Thanks for the bug report @mthielk

- Python
Published by edsu over 6 years ago

twarc - v1.8.0

This release includes a new command line option --app_auth that lets you control whether App Auth is used for connecting to the Twitter API instead of User Auth (the default).

This can be super useful in cases when you know the rate limits are better for App Auth (search) but not so useful in cases where it isn't (hydration).

For example when using User Auth you are limited to issuing 180 request per 15 minutes, and with App Auth you can issue 450 requests per 15 minutes. If you are searching for a large number of tweets switching to App Auth means you can retrieve 4,320,000 tweets in 24 hours, as compared with 1,728,000.

- Python
Published by edsu over 6 years ago

twarc - v.1.7.5

This release includes a bug fix to the twarc.Twarc.replies method that was preventing it from fully processing quoted tweets as part of the conversation thread. Many thanks to @freeatnet for noticing the problem and fixing it!

- Python
Published by edsu over 6 years ago

twarc - v1.7.3

v1.7.3 includes a new max_pages parameter on the Twarc.friend_ids and Twarc.follower_ids for more control over how many API requests are performed behind the scenes. Thanks to @FlxVctr for this contribution!

- Python
Published by edsu about 7 years ago

twarc - v1.7.1

v1.7.1 adds the ability to filter tweets on language. You can use from the command line, with one or more --lang arguments. So for example this will filter tweets that mention Paris or Madrid that are written in French or Spanish.

twarc filter paris,madrid --lang es --lang fr

You can also use programmatically:

python for tweet in t.filter('paris,madrid', lang=['es', 'sp']): print(tweet['full_text'])

Thanks for the idea @tugrulz and for your patience!

- Python
Published by edsu about 7 years ago

twarc - v1.7.0

Includes a new Twarc method oembed() which will return the oEmbed JSON for a given tweet. Thanks for the contribution @dshahrokhian!

- Python
Published by edsu about 7 years ago

twarc - v1.6.4

  • bug fix for Twarc.lookup_users

- Python
Published by edsu over 7 years ago

twarc - v1.6.3

This release includes improved logging which uses a named logger twarc instead of the root logger. Thanks @justinlittman!

- Python
Published by edsu over 7 years ago

twarc - v1.6.2

Added the ability to fetch the authenticating user's home timeline with the timeline command when no user id or screen name is supplied.

twarc timeline > timeline.jsonl

- Python
Published by edsu over 7 years ago

twarc - v1.5.2

This release improves the media URL reporting in the CSV output #239. Thanks to @lotsoaxolotls for reporting it.

- Python
Published by edsu almost 8 years ago

twarc - v1.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.

- Python
Published by edsu almost 8 years ago

twarc - v1.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.

- Python
Published by edsu almost 8 years ago

twarc - v1.4.7

A bugfix release for the csv-excel output format.

- Python
Published by edsu about 8 years ago

twarc - v1.4.5

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

- Python
Published by edsu about 8 years ago

twarc - v1.4.4

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

- Python
Published by edsu about 8 years ago

twarc - v1.4.3

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.

- Python
Published by edsu about 8 years ago

twarc - v1.4.0

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.

- Python
Published by edsu over 8 years ago

twarc - v1.3.5

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.

- Python
Published by edsu over 8 years ago

twarc - v1.3.4

A small bugfix release to correct a missing import.

- Python
Published by edsu over 8 years ago

twarc - v1.3.1

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
...

- Python
Published by edsu over 8 years ago