Skip to content

Version 2.0.0

Compare
Choose a tag to compare
@d60 d60 released this 10 Jul 13:00
· 29 commits to main since this release

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 protected]',
            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.