Created
October 20, 2025 22:07
-
-
Save cmj/31c0a03db11a8c1787a5aeecb0c228a9 to your computer and use it in GitHub Desktop.
twikit auth example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import asyncio | |
| from twikit import Client | |
| USERNAME = '' | |
| PASSWORD = '' | |
| # Initialize client | |
| #client = Client(language='en-US', proxy='http://127.0.0.1:8888') | |
| client = Client( | |
| language='en-US' | |
| ) | |
| async def main(): | |
| await client.login( | |
| auth_info_1=USERNAME , | |
| password=PASSWORD | |
| ) | |
| asyncio.run(main()) | |
| client.save_cookies('cookies.json') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment