Releases: d60/twikit
Version 2.2.0
Version 2.2.0
- Implemented transaction id.
- Fixed error in create_tweet.
- Fixed login error (
flow name LoginFlow is currently not accessible
).
python -m pip install -U twikit -U lxml
Version 2.1.3
Version 2.1.3
- Fixed
KeyError: 'open_account'"
flow name LoginFlow is currently not accessible
has not yet been fixed.
Version 2.1.0
Version 2.1.0
New Features
-
Added
twikit.guest
module, which allows operations such as retrieving users, tweets, and user tweets without logging in. You can refer toexamples/guest.py
for usage examples. -
Added
Client.get_user_highlights_tweets
.
Guest client quickstart
import asyncio
from twikit.guest import GuestClient
client = GuestClient()
async def main():
# Activate the client by generating a guest token.
await client.activate()
# Get user by screen name
user = await client.get_user_by_screen_name('elonmusk')
print(user)
# Get user by ID
user = await client.get_user_by_id('44196397')
print(user)
user_tweets = await client.get_user_tweets('44196397')
print(user_tweets)
tweet = await client.get_tweet_by_id('1519480761749016577')
print(tweet)
asyncio.run(main())
Version 2.0.0
Version 2.0.0 has been released
Twikit version 2.0.0 has been released. From this version, the synchronous version has been discontinued and only the asynchronous version is available. Also, twikit.twikit_async
module has been renamed to twikit
.
To update run pip install -U twikit
.
Example Code for version 2:
import asyncio
import os
# No need to write "from twikit.twikit_async import Client"
from twikit import Client
client = Client()
async def main():
if not os.path.exists('cookies.json'):
await client.login(
auth_info_1='example',
auth_info_2='email@example.com',
password='example0000'
)
client.save_cookies('cookies.json')
else:
client.load_cookies('cookies.json')
client.create_tweet('Hello World.')
asyncio.run(main())
More usage examples: https://github.com/d60/twikit/tree/main/examples
Documentation: https://twikit.readthedocs.io/en/latest/twikit.html
Minor Changes and Bug Fixes:
- Removed
Result.cursor
andResult.token
. - Changed the return type of
follow_user
,unfollow_user
,mute_user
,block_user
,unblock_user
andunmute_user
fromhttpx.Response
toUser
. - Fixed a bug where the capsolver proxy was not specified.
Version 1.7.6
Tweet.state → Tweet.view_count_state
Version 1.7.3
version1.7.3 fixed async/logout | added _get_user_state
Version 1.7.1
Added totp_secret parameter to the login method for handling two-factor authentication
Version 1.7.0
Version 1.7.0
Added
- Account auto unlock
Added the ability to automatically unlock accounts using Captcha Solver.
https://twikit.readthedocs.io/en/latest/twikit.html#twikit._captcha.capsolver.Capsolver
Removed
- Random User Agent Generation
Discontinued random User Agent generation. - Client.get_media
This method has been removed.
Deprecated
- proxies Argument
The proxies argument inClient
is now deprecated. Useproxy
instead.
Version 1.6.4
Added Client.reverse_geocode
, Client.search_geo
, Client.get_place
, Place
Version 1.6.3
Added get_latest_followers, get_latest_friends, get_followers_ids, get_friends_ids