Skip to content

Instantly share code, notes, and snippets.

View mthomason's full-sized avatar
👻

Michael Thomason mthomason

👻
View GitHub Profile
@mthomason
mthomason / following_export.py
Created March 5, 2025 16:06
Throwaway Python 3 script using to list Twitter-X followers.
import asyncio
import getpass
from typing import List, Dict
from twscrape import API, gather # type: ignore
OUTPUT_FILE = "following_export.txt" # Hardcoded output file name
async def get_following_accounts(target_username: str, api: API) -> List[Dict[str, str]]:
"""
Fetch the accounts that the given target user follows.