Online Demo: https://pluto0x0.github.io/X_based_china/
pip install aiohttp_client_cache loguru aiolimiterYou will need your own key for the following API's from RapidAPI:
Rename config.default.py to config.py and paste the key in it.
See Results & Statistics for API usage statistics.
python main.pyOnce you get the result, build a static web page:
python render.py china.jsonlIn config.py
SEED_ACCOUNTS = [
"linboweibu17"
# "KunDong95265"
]
REQUESTS_PER_SECOND = 9
MAX_HIT = 100000
OUTPUT_FILE = "china.jsonl"
MAX_FOLLOWINGS = 800SEED_ACCOUNTS: Seed accounts in the initial queueREQUESTS_PER_SECOND: Maximum number of requests per secMAX_HIT = 100000: Exit when finding 100000 accounts, 0 = no limitOUTPUT_FILE: Output file nameMAX_FOLLOWINGS: Max number of accounts fetched from a following list, 0 = no limit
Starting from seed accounts, Breadth-First Search for X accounts based on their following list.
Async http requests are cached with SQLite DB.
- RUN #1: 5,200 results with 17,980 Twttr API request and 1,000 Twitter API requests
- RUN #2: 4,200 results with 70,000 Twttr API request and 5,350 Twitter API requests
MIT