rainbowstream icon indicating copy to clipboard operation
rainbowstream copied to clipboard

Tweet Text Truncated

Open cyocum opened this issue 7 years ago • 13 comments

I just started using this but I am finding that tweets are truncated and I am forced to open the tweet in the browser to see all the text. For instance:

Front page tomorrow: UK 'utterly unprepared' for Brexit talks, as frustrated EU negotiators call for clarity on key… https://twitter.com/i/web/status/888138661816086528

When the actual tweet text is:

Front page tomorrow: UK 'utterly unprepared' for Brexit talks, as frustrated EU negotiators call for clarity on key issues inc divorce bill

I should see the entire text then the image link. I am not sure if this is related to #96 but it may be. Making the terminal wider does not seem to have an effect.

cyocum avatar Jul 20 '17 21:07 cyocum

This is related to changes announced last year where certain things (including @mentions) no longer count toward the 140-character length, effectively making some tweets longer than 140 characters.

guanix avatar Aug 03 '17 13:08 guanix

It says "the overall Tweet JSON object will be able to exceed 140 characters. Developers must avoid hard-coding length assumptions into their applications." Because rainbowstream seems to max at 140, it is useless.

mviitanen avatar Aug 07 '17 17:08 mviitanen

so how can we change this?

aoyawale avatar Aug 25 '17 03:08 aoyawale

Twitter has an overview of what the “new” tweets look like. In short, if the truncated field is true, one is supposed to render the tweet based on the content of the extended_tweet field. There is also a new API mode (“extended mode”) where one can just use the new full_text field, and the current text field has been removed.

guanix avatar Sep 07 '17 20:09 guanix

Calling the new API extended mode turned out to be quite simple ! You can cherry-pick/adapt this commit (adding support for the rainbowstream home, view and me commands at least) if you want to try it : https://github.com/MaxyMoos/rainbowstream/commit/b9f042009eb6620ee587575bdc8252538f3da813

Still some work to be done in order to work with the streams, I'll try to have a look at it.

MaxyMoos avatar Nov 10 '17 11:11 MaxyMoos

And here's another commit that adds support for these in the default stream : https://github.com/MaxyMoos/rainbowstream/commit/bc7d8b16c1603a52956fb103ef115de4e338bb54 It hasn't been tested much but so far so good on my side - it also appears to display 280 character tweets without issues (I don't know if that was the case beforehand)

MaxyMoos avatar Nov 10 '17 17:11 MaxyMoos

Any news on this ?

CaptainQuirk avatar Dec 18 '17 17:12 CaptainQuirk

bump

drjackyl avatar Feb 28 '18 20:02 drjackyl

It looks like PR #250 was just merged in and the maintainer said 260 should be available soon in the next release. :) Many thanks to @MaxyMoos !

smalleel avatar Mar 14 '18 23:03 smalleel

This thing still truncates tweets.

It's not really useful if I have to open all tweets in a browser just to read the entire tweet.

Marko​

On Wed, Mar 14, 2018 at 5:16 PM, Lee Ball [email protected] wrote:

It looks like PR #250 https://github.com/orakaro/rainbowstream/pull/250 was just merged in and the maintainer said 260 should be available soon in the next release. :) Many thanks to @MaxyMoos https://github.com/maxymoos !

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/orakaro/rainbowstream/issues/240#issuecomment-373206377, or mute the thread https://github.com/notifications/unsubscribe-auth/AAeIx0vTTep8FLtk8DyZA8PmTSN-6TePks5teaTLgaJpZM4OerOm .

mviitanen avatar Mar 21 '18 23:03 mviitanen

@mviitanen Are you on the current release or pulling directly from the master branch ? The PR has been merged but not released yet, which may explain this.

MaxyMoos avatar Mar 22 '18 07:03 MaxyMoos

Hmm, whatever isn't working for @mviitanen isn't working for me either.

keithzg@district:~/Code/git/rainbowstream$ pip3 install .
Processing /home/keithzg/Code/git/rainbowstream
Collecting Pillow (from rainbowstream==1.3.8)
  Using cached Pillow-5.1.0-cp36-cp36m-manylinux1_x86_64.whl
Collecting PySocks (from rainbowstream==1.3.8)
Collecting arrow (from rainbowstream==1.3.8)
Collecting pocket (from rainbowstream==1.3.8)
Collecting pyfiglet (from rainbowstream==1.3.8)
Collecting python-dateutil (from rainbowstream==1.3.8)
  Using cached python_dateutil-2.7.2-py2.py3-none-any.whl
Collecting requests==2.5.3 (from rainbowstream==1.3.8)
  Using cached requests-2.5.3-py2.py3-none-any.whl
Collecting twitter (from rainbowstream==1.3.8)
  Using cached twitter-1.18.0-py2.py3-none-any.whl
Collecting six>=1.5 (from python-dateutil->rainbowstream==1.3.8)
  Using cached six-1.11.0-py2.py3-none-any.whl
Installing collected packages: Pillow, PySocks, six, python-dateutil, arrow, requests, pocket, pyfiglet, twitter, rainbowstream
  Running setup.py install for rainbowstream ... done
Successfully installed Pillow-5.1.0 PySocks-1.6.8 arrow-0.12.1 pocket-0.3.6 pyfiglet-0.7.5 python-dateutil-2.7.2 rainbowstream-1.3.8 requests-2.18.4 six-1.11.0 twitter-1.18.0

So in theory I've got the latest release, and indeed I'm doing this from master:

keithzg@district:~/Code/git/rainbowstream$ git pull
Already up to date.
keithzg@district:~/Code/git/rainbowstream$ git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean

and yet, I still see truncation of tweets.

keithzg avatar Apr 03 '18 06:04 keithzg

Oddly enough, it doesn't appear to always still truncate tweets. For instance, when a treat reappears in the stream because it's been favorited by someone, the text then isn't truncated. (I'm not 100% sure whether that's new behaviour or not.)

keithzg avatar Apr 03 '18 08:04 keithzg