A async port of twitter-api-client with extra features
Project description
asyncTwitterClient
Async port of twitter-api-client
~ of 2024-04-24 this is being maintained as its being used in a project im being paid to maintain ~
MASSIVE Thank you to Trevor Hobenshield @trevorhobenshield for making this! All I have done is changed the client to asyncClient
Key Differences
supports unlocking account via account.unlockViaArkoseCaptcha()
linted by ruff
renames tweet and other functions to asyncTweet asyncReply etc
all functions must be awaited
uses httpx asyncclient instead of Client so it supports anyio, trio, curio, asyncio
natively supports proxies, http(s)+socks5
reply & quote support uploading images
save_cookies takes toFile arg instead of always making a file and rets a dict
Original search.py uses asyncio.gather(), i switched to use anyio.create_task_group() with a results list that the tasks append to, might not be a 1:1 behaviour
Todo
Add more captchas providers to solve arkose challenge
Find a way to provide real ui_metrics for unlocker
Find a way to use original AsyncClient for unlocker
Maybe fix searching somehwat?
Add signup
pip install asyncTwitterClient
import anyio
from asyncTwitter.asyncAccount import AsyncAccount
async def main():
twitter = AsyncAccount()
await twitter.asyncAuthenticate(
cookies={"ct0": "fuefjwegf89ewg9uiwg9", "auth_token": "je09giewg9iwg9j"}
)
if __name__ == "__main__":
anyio.run(main)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for asyncTwitterClient-0.7.0.win-amd64.zip
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28de0f77f7d971cc0974ce6ae51d2cda93e5f98f671de9e89702e3bb649a8612 |
|
MD5 | ef254ae69a258b6b9399149fe40b6dff |
|
BLAKE2b-256 | 44f5a8b9b7ff31c62e47ff902f66eb2c4adf7df9a6b8dadfc488f37a2fb0e0db |