From 1a1869a9e2f18c5ff6fad10cb093135c2ecd2976 Mon Sep 17 00:00:00 2001 From: TimmDay Date: Thu, 26 Apr 2018 17:26:46 +0200 Subject: [PATCH] updated cursor_tutorial with extended_tweet instructions --- docs/cursor_tutorial.rst | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/cursor_tutorial.rst b/docs/cursor_tutorial.rst index 6596ea6..aeeea9f 100644 --- a/docs/cursor_tutorial.rst +++ b/docs/cursor_tutorial.rst @@ -87,7 +87,23 @@ What if you only want n items or pages returned? You pass into the items() or pa # Only iterate through the first 200 statuses for status in tweepy.Cursor(api.user_timeline).items(200): process_status(status) - + # Only iterate through the first 3 pages for page in tweepy.Cursor(api.user_timeline).pages(3): process_page(page) + + +Include Tweets > 140 Characters +------------------------------- + +Since twitter increased the maximum characters allowed in a tweet from 140 to 280, you may notice that tweets greater than 140 characters are truncated with a ... +If you want your results to include the full text of the long tweets make these simple changes: +- add the argument tweet_mode='extended' to your Cursor object call +- change your usages of .text to .full_text + +.. code-block :: python + +# example code +tweets = tweepy.Cursor(api.search, tweet_mode='extended') +for tweet in tweets: + content = tweet.full_text -- 2.25.1