38 lines
873 B
Python
38 lines
873 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[0].links[0].url)
|
|
|
|
|
|
# get the link https://twitter.com/i/broadcasts/1DXGyjnAQVeJM
|
|
# process to to download
|
|
|
|
# get the link
|
|
# https://x.com/i/spaces/1LyGBnmdpejGN
|
|
# process
|
|
# space_links = 'https://x.com/i/spaces/1LyGBnmdpejGN'
|
|
|
|
# # new space resources found
|
|
# # download space resources
|
|
|
|
# print(test_list)
|
|
|
|
if __name__ == "__main__":
|
|
asyncio.run(main())
|
|
|