Twarc

Latest version: v2.14.0

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

Scan your dependencies

Page 22 of 22

0.3.0

New functionality for managing keys in a config file `.twarc`. You can also have multiple sets of credentials in your config which can be used with the `--profile` command line option.

0.2.7

- handle connection reset error which are now occurring during search
- added zenodo integration for citing twarc by DOI
- minor changes to utilities for python3

0.2.2

- Python3 support
- now accepts twitter credentials on the command line

0.2.0

- search: `twarc.py --search ferguson > tweets.json`
- stream: `twarc.py --stream ferguson > tweets.json`
- hydrate: `twarc.py --hydrate ids.txt > tweets.json`

Notice that twarc no longer decides what filename to use, and attempt to pick up where it once left off by reading the last tweet id from a previous file. The reason for this is that this functionality predated the ability to stream directly. twarc.py now just writes line oriented JSON to stdout, which you can send where you want including potentially compressing it:


twarc.py --search ferguson | gzip - > tweets.json.gz


The three command line modes map directly on to the programmatic usage. You first create a `Twarc` instance and then call `search`, `stream` and `hydrate` methods:

python
from twarc import Twarc

t = Twarc()

for tweet in t.search('ferguson'):
print tweet

for tweet in t.stream('ferguson'):
print tweet

for tweet in t.hydrate(open('ids.txt')):
print tweet


The nice thing about these changes is that they have consolidated and simplified the rate limiting logic, and have removed about 1/3 of the code base. Please give it a try and let us know how it goes!

0.1.0

The big change in this release is the removal of the scrape functionality since it is at odds with Twitter's Terms of Service.

Page 22 of 22

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.