Skip to content

Commit

Permalink
Merge pull request #228 from jiangzhuo/main
Browse files Browse the repository at this point in the history
Fix: Correct handling of note tweets in create_tweet method
  • Loading branch information
nennneko5787 authored Oct 9, 2024
2 parents 6d19016 + b84d130 commit f265840
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion twikit/client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1238,7 +1238,10 @@ async def create_tweet(
reply_to, attachment_url, community_id, share_with_followers,
richtext_options, edit_tweet_id, limit_mode
)
_result = response['data']['create_tweet']['tweet_results']
if is_note_tweet:
_result = response['data']['notetweet_create']['tweet_results']
else:
_result = response['data']['create_tweet']['tweet_results']
if not _result:
raise_exceptions_from_response(response['errors'])
raise CouldNotTweet(
Expand Down

0 comments on commit f265840

Please sign in to comment.