Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ryosukedtomita/twitter-api
仕様変更後に対応してません。
https://github.com/ryosukedtomita/twitter-api
scraping-python twitter-api
Last synced: about 2 months ago
JSON representation
仕様変更後に対応してません。
- Host: GitHub
- URL: https://github.com/ryosukedtomita/twitter-api
- Owner: RyosukeDTomita
- License: mit
- Created: 2021-08-26T15:24:52.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-03-14T13:24:21.000Z (10 months ago)
- Last Synced: 2024-05-11T05:55:25.898Z (8 months ago)
- Topics: scraping-python, twitter-api
- Language: Python
- Homepage:
- Size: 729 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# INDEX
Using twitter api, get twitter data.- [ABOUT](#ABOUT)
- [ENVIRONMENT](#ABOUT)
- [PREPARING](#PREPARING)
- [HOW TO USE](#HOW TO USE)
- [REFERENCE(#REFERENCE)]# ABOUT
These programs need twitter api BEARER_TOKEN.
If you don't have api token, please register from [here](https://developer.twitter.com/en/apps/)# ENVIRONMENT
I used the following environment.
- Python3.8
- Ubuntu 20.04 LTS or MacOS CatalinaI think these program can run in windows.But, I didn't test it.
# PREPARING
1. Plase get your token from [your twitter developer page](https://developer.twitter.com/en/apps/)
2. Export your token to environment variables. Add these commands in bashrc.(You need to replace for your token.)```
export CONSUMER_KEY=
export CONSUMER_SECRET=
export BEARER_TOKEN=
```# HOW TO USE
## fetching selected user's followers data and save to text file.```shell
python3 fetch_followerList.py -i
```## fetching selected user's tweet to save to text file.
```shell
python3 fetch_timeline.py -i
```## monitoring selected user's tweet.
Scanning selected user's tweet per 1 minutes.
If found new tweet then save to text file.```shell
python3 monitor_timeline_per1min.py -i
```## compare followerslist.csv and find common user.
```shell
python3 find_commonuser.py -f -f
```## fetch followerlist.csv's icon image.
```shell
python3 fetch_follower_icon.py -f
```
******# REFERENCE
- If you get rate-limit error(429),see [rate-limit](https://developer.twitter.com/en/docs/twitter-api/v1/rate-limits).
- [Developer terms](https://developer.twitter.com/en/developer-terms/more-on-restricted-use-cases)