Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ryosukedtomita/twitter-api

仕様変更後に対応してません。
https://github.com/ryosukedtomita/twitter-api

scraping-python twitter-api

Last synced: about 2 months ago
JSON representation

仕様変更後に対応してません。

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 Catalina

I 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)