https://github.com/kevincoakley/twitter-stream-archive
Save Twitter Streams to JSON using the Twitter Streaming API.
https://github.com/kevincoakley/twitter-stream-archive
streaming-api twitter
Last synced: about 1 year ago
JSON representation
Save Twitter Streams to JSON using the Twitter Streaming API.
- Host: GitHub
- URL: https://github.com/kevincoakley/twitter-stream-archive
- Owner: kevincoakley
- Created: 2019-11-26T17:32:29.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-01T04:58:12.000Z (over 3 years ago)
- Last Synced: 2025-01-13T22:22:51.267Z (over 1 year ago)
- Topics: streaming-api, twitter
- Language: Python
- Homepage:
- Size: 64.5 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# twitter-stream-archive


[](https://codecov.io/gh/kevincoakley/twitter-stream-archive)
Install twitter-stream-archive from source:
$ git clone https://github.com/kevincoakley/twitter-stream-archive.git
$ cd twitter-stream-archive
$ pip install -r requirements.txt
$ python setup.py install
Command line options and environment variables:
$ twitter-stream-archive
--debug
--consumer-token [CONSUMER_TOKEN] - Twitter API Consumer Token. (Required)
--consumer-token-secret [CONSUMER_TOKEN_SECRET] - Twitter API Consumer Token Secret. (Required)
--access-token [ACCESS_TOKEN] - Twitter API Access Token. (Required)
--access-token-secret [ACCESS_TOKEN_SECRET] - Twitter API Access Token Secret. (Required)
--archive-path [ARCHIVE_PATH] - Path to Save Archived Tweets. (Required)
--stream-track [STREAM_TRACK] - Comma Separated List of Terms to Apply to the Stream Filter.
--stream-locations [STREAM_LOCATIONS] - Comma Separated List of Geo Coordinates to Apply to the Stream Filter.
Build twitter-stream-archive into a Docker container:
$ git clone https://github.com/kevincoakley/twitter-stream-archive.git
$ cd twitter-stream-archive
$ docker build . --file Dockerfile --tag twitter-stream-archive
Run twitter-stream-archive from a Docker container:
docker run --name twitter-stream-archive -d \
-e CONSUMER_TOKEN='consumer-token' \
-e CONSUMER_TOKEN_SECRET='consumer-token-secret' \
-e ACCESS_TOKEN='access-token' \
-e ACCESS_TOKEN_SECRET='access-token' \
-e ARCHIVE_PATH='/twitter-stream-archive/' \
-e STREAM_TRACK='track,terms' \
-e STREAM_LOCATIONS='x1,y1,x2,y2' \
-v '/local/path:/twitter-stream-archive/' \
-p 8000:8000 \
twitter-stream-archive