User is unable to open url's shortened by Twitters URL shortener
See original GitHub issue- System: Kubuntu 18.04
- Python version: 2.7
- rainbowstream v 1.3.7
Repro:
-
Launch rainbowstream
-
Locate a tweet that contains a URL shortened by Twitters URL shortener(https://t.co/wNYPltI7ll )
-
Type
open id#
Expected:
- The link will open in the default web browser.
Bug:
No url here @.@!
is displayed.
Additional Notes:
- I’ve confirmed that bit.ly and ow.ly shortened links open correctly in my setup.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
Twitter link shortener (t.co) and how it works
Twitter automatically shortens links within Tweets or Direct Messages. Find FAQ surrounding t.co links.
Read more >Safari Not Opening t.co Short Links from Twitter? Quick Fixes
8 Techniques to Open t.co Short Links from Twitter on iPad, iPhone & Mac · 1. Reload the URL · 2. Remove 's'...
Read more >Workarounds for Safari Not Opening t.co Short Links from Twitter
The simplest workaround is simply to reload the t.co short link several times until the link eventually responds and loads as expected.
Read more >Why doesn't Twitter's URL shortening always work?
Sometimes URLs can be harmful, so please be careful when clicking on links that were shortened using an external link shortening service.
Read more >Twitter auto shorten URL not working - Stack Overflow
Do note that Twitter shortens all URLs, even when "shortening" actually makes them longer. For example, "http://bit.ly" will use up 22 characters (not...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I don’t know any Python, but I was able to figure out some workaround for the “No url here @.@” problem. It seems the problem is based on the place of the shown URL in the Twitter API return value for a tweet. So adding some code in rainbow.py function urlopen() to find different places for the URLs does the magic:
I don’t know, if I have found all places for URLs. Maybe someone can improve on this.
It looks like the URLs are provided by Twitter’s API library, so this may need to be addressed upstream.