Twarc

Latest version: v2.14.0

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

Scan your dependencies

Page 19 of 22

1.0.5

Twarc.replies is not recursive by default. It was documented that way, but the implementation had it the other way around. Not it is actually turned off by default. Also, when recursive is used the original tweet is returned as well. Thanks to paulgb for the contribution!

1.0.4

Twarc now includes a `replies` command and API call that attempts to use Twitter's search API to find replies to a given tweet.


% twarc replies 821474942931914752 > replies.json


You can also use it on a file of tweets:


% twarc replies tweets.json > replies.json


If you want you can also fetch replies to replies by using the `--recursive` option...although it could be time consuming because of rate limits on the search API:


% twarc replies 821474942931914752 --recursive > replies.json


The logic was borrowed from a standalone script that is described in some detail [here](https://gist.github.com/edsu/54e6f7d63df3866a87a15aed17b51eaf).

---

Finally there is a new utility included [utils/gexf.py](https://github.com/DocNow/twarc/blob/master/utils/gexf.py) that will create a [GEXF](https://gephi.org/gexf/format/) file from a file of tweets that can be loaded into [Gephi](https://gephi.org/). It is really just a start of something, so if you have ideas for improving it, please send them.


% twarc replies 821439203561115648 > replies.json
% python utils/gexf.py replies.json > replies.gexf
open replies.gexf in Gephi and you'll see something like this


![screen shot 2017-01-17 at 3 35 58 pm](https://cloud.githubusercontent.com/assets/33829/22042944/5c0cad08-dcdb-11e6-8145-8f67c66f24b5.png)

1.0.3

Includes a new dehydrate command for generating an id list from a file of tweets:


twarc dehydrate tweets.json > tweet-ids.txt


Thanks for putting in the work on this hugovk!

1.0.2

Added --warnings back in order to send rate limit warnings to stdout with tweets.

1.0.1

This is a quick follow on release to get a fix out for 120 which dunn noticed. It's a small change that lets you use the `version` and `help` commands before giving twarc your twitter keys.

1.0.0

🎉 Finally a v1.0.0 release. It was a long time coming. 🎉

While the functionality inside of twarc the module has remained pretty much the same in this release, the command line interface has changed significantly to use the subcommand style instead of leaning so heavily on command line options.

So what this means is before when you did something like this:


twarc.py --search blacklivesmatter > tweets.json


you will now do this:


twarc search blacklivesmatter > tweets.json


and similarly:


twarc filter blacklivesmatter > stream.json
twarc followers deray > user-ids.txt
twarc friends Nettaaaaaaaa > user-ids.txt
twarc help
twarc hydrate ids.txt > tweets.json
twarc retweets 20 > retweets.json
twarc sample > stream.json
twarc timeline deray > tweets.json
twarc trends 2486982 > trends.json
twarc users user-ids.txt > users.json


See `twarc help` for all the details and options.

Page 19 of 22

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.