33 lines
735 B
Python
33 lines
735 B
Python
#!/usr/bin/env python
|
|
|
|
import asyncio
|
|
from twscrape import API, gather
|
|
from twscrape.logger import set_log_level
|
|
|
|
async def main():
|
|
api = API()
|
|
# await api.pool.add_account("louiscklaw", "24p69gki", "louiscklaw@gmail.com", "24p69gki")
|
|
await api.pool.login_all()
|
|
|
|
user_login = "LouiscklawLouis"
|
|
user = await api.user_by_login(user_login)
|
|
print(user.id)
|
|
|
|
user_id = user.id
|
|
test_list = await gather(api.user_tweets(user_id, limit=5))
|
|
from pprint import pprint
|
|
pprint(test_list)
|
|
|
|
# get the link https://twitter.com/i/broadcasts/1DXGyjnAQVeJM
|
|
# process to to download
|
|
|
|
# get the link
|
|
# https://x.com/i/spaces/1LyGBnmdpejGN
|
|
# process
|
|
|
|
# print(test_list)
|
|
|
|
if __name__ == "__main__":
|
|
asyncio.run(main())
|
|
|