from twikit import Client
from configparser import ConfigParser
MINIMUM_TWEETS = 10
QUERY = 'python'
# Read login credentials from config file
config = ConfigParser()
config.read('config.ini')
username = config['Twitter']['username']
password = config['Twitter']['password']
email = config['Twitter']['email']
async def main():
# Authenticate to X.com
client = Client(language='en-US')
await client.login(auth_info_1=username, auth_info_2=email, password=password)
# Get Tweets
tweets = await client.search_tweet(QUERY, product='Top', count=MINIMUM_TWEETS)
# Look at Tweets
print(tweets)
# Run the event loop
asyncio.run(main())
File "c:\Users*******\Documents\python\test.py", line 18, in main
await client.login(auth_info_1=username, auth_info_2=email, password=password)
Any ideas? Didn't find this error anywhere in the issues.
(and trust me, my credentials are okay).