Skip to content

Releases: d60/twikit

Version 2.1.3

23 Aug 15:14
@d60 d60
Compare
Choose a tag to compare

Version 2.1.3

  • Fixed KeyError: 'open_account'"
  • flow name LoginFlow is currently not accessible has not yet been fixed.

Version 2.1.0

25 Jul 17:56
@d60 d60
Compare
Choose a tag to compare

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 to examples/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

10 Jul 13:00
@d60 d60
Compare
Choose a tag to compare

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 and Result.token.
  • Changed the return type of follow_user, unfollow_user, mute_user, block_user, unblock_user and unmute_user from httpx.Response to User.
  • Fixed a bug where the capsolver proxy was not specified.

Version 1.7.6

28 Jun 13:48
@d60 d60
Compare
Choose a tag to compare

Tweet.state → Tweet.view_count_state

Version 1.7.3

05 Jun 15:34
@d60 d60
Compare
Choose a tag to compare
version1.7.3

fixed async/logout | added _get_user_state

Version 1.7.1

03 Jun 14:07
@d60 d60
Compare
Choose a tag to compare

Added totp_secret parameter to the login method for handling two-factor authentication

Version 1.7.0

02 Jun 15:58
@d60 d60
70d271c
Compare
Choose a tag to compare

Version 1.7.0

Added

Removed

  • Random User Agent Generation
    Discontinued random User Agent generation.
  • Client.get_media
    This method has been removed.

Deprecated

  • proxies Argument
    The proxies argument in Client is now deprecated. Use proxy instead.

Version 1.6.4

18 May 16:56
@d60 d60
Compare
Choose a tag to compare

Added Client.reverse_geocode, Client.search_geo, Client.get_place, Place

Version 1.6.3

17 May 14:49
@d60 d60
Compare
Choose a tag to compare

Added get_latest_followers, get_latest_friends, get_followers_ids, get_friends_ids

Version 1.6.1

04 May 04:22
@d60 d60
Compare
Choose a tag to compare

Added get_place_trends, get_available_locations, TweetEngagementEvent.reply_count