twikit
twikit copied to clipboard
Can't post videos?
media_id = await twikit_thio.upload_media('vid.mp4', True)
print(media_id)
v = await twikit_thio.create_tweet(text="Video Tweet", media_ids=[media_id])
print(v)
I am getting :
Traceback (most recent call last):
File "/Users/xxxx/common.py", line 103, in <module>
asyncio.run(test())
File "/Users/aaa/.pyenv/versions/3.12.1/lib/python3.12/asyncio/runners.py", line 194, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/Users/aaa/.pyenv/versions/3.12.1/lib/python3.12/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/aaa/.pyenv/versions/3.12.1/lib/python3.12/asyncio/base_events.py", line 684, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/Users/xxxx/common.py", line 97, in test
await twikit_thio.create_tweet(text="Video Tweet", media_ids=[media_id])
File "/Users/aaa/.pyenv/versions/aaaa/lib/python3.12/site-packages/twikit/client/client.py", line 1241, in create_tweet
_result = response['data']['create_tweet']['tweet_results']
I checked, and the video is uploaded successfully. I am also able to post the video manually. I can also tweet normally, just posting with a video doesn't work.