Bug 294600 - "de-shortening" of shortened urls does not work
Summary: "de-shortening" of shortened urls does not work
Status: RESOLVED FIXED
Alias: None
Product: choqok
Classification: Applications
Component: general (show other bugs)
Version: 1.2
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Mehrdad Momeny
URL:
Keywords:
: 303161 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-02-22 08:37 UTC by Mathias Homann
Modified: 2014-12-15 17:10 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 1.5


Attachments
longurl.org instead of redirection (16.29 KB, patch)
2014-11-30 19:19 UTC, Eugene Shalygin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mathias Homann 2012-02-22 08:37:51 UTC
Version:           1.2
OS:                Linux

When I hover the mouse over a shortened url in someone's tweets I get a hovertip with the same shortened url. I would expect the original url, since I have the "de-shortening" module active.

Reproducible: Always

Steps to Reproduce:
hover mouse over shortened url

Actual Results:  
hovertip with shortened url

Expected Results:  
hovertip with original url

OS: Linux (x86_64) release 3.1.9-1.4-desktop
Compiler: gcc

all the shortened urls that dont get resolved seem to be under http://t.co/
Comment 1 Mehrdad Momeny 2012-02-22 08:40:37 UTC
It should work with version 1.2 of Choqok.
Can you give me some examples of not working links?
Comment 2 Mathias Homann 2012-02-22 08:46:24 UTC
it looks as if my reply has to be "any".

not a single link in a tweet gets de-shortened, and they are *all* under http://t.co/
Comment 3 Mathias Homann 2012-02-22 08:52:46 UTC
I've created a few tweets that show it pretty well, they're all @choqok

fun part is, when I look at the same tweets on the twitter web site, the last url is *not* auto-shortened under t.co/
Comment 4 Mathias Homann 2012-02-22 10:12:20 UTC
note https://dev.twitter.com/docs/tco-url-wrapper

"(done) URL Entities returned in the Search API"

looks like all urls returned through the API will be wrapped into t.co urls from now on.

That explains my findings a bit.
Seems that ANY twitter api client now shows ANY url as wrapped into a t.co shortening, but the twitter web site does not.

Add the fact that by now twitter itself wraps ANY url submitted in a tweet into a t.co wrapper, and url shortening in choqok is pretty much obsolete 0.o
Comment 5 Kete 2012-03-25 22:24:15 UTC
I'm having this same problem with version 1.3. Different kinds of shortened URLs don't work: ur1.ca, mcaf.ee, and j.mp, but a few do work: dlvr.it, bit.ly and goo.gl.
Comment 6 Daniele Scasciafratte 2012-05-24 13:00:38 UTC
any news for fix this issue?
Comment 7 Mehrdad Momeny 2012-05-24 13:31:17 UTC
(In reply to comment #5)
> I'm having this same problem with version 1.3. Different kinds of shortened
> URLs don't work: ur1.ca, mcaf.ee, and j.mp, but a few do work: dlvr.it,
> bit.ly and goo.gl.

Yeah, there's some problem with those domain or services.
Because Choqok tries to access what is the URLs, and with this approach it will get the actual URL of shortened ones, but with those URLs, it cannot :/

(In reply to comment #6)
> any news for fix this issue?

For me, it works well for new comming tweets, but sometime don't work well with old tweets :/
Comment 8 Daniele Scasciafratte 2012-07-02 20:01:43 UTC
i have see that on hover of a link the url was deshortened.
it's a uncomfortable solution :-/
Comment 9 Mehrdad Momeny 2012-07-03 01:09:00 UTC
(In reply to comment #8)
> i have see that on hover of a link the url was deshortened.
> it's a uncomfortable solution :-/

What is the comfortable solution?
Comment 10 Reuben 2012-07-03 07:52:45 UTC
(In reply to comment #9)
> What is the comfortable solution?

I'd assume replacing the shortened links.
Comment 11 Daniele Scasciafratte 2012-07-03 11:58:28 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > What is the comfortable solution?
> 
> I'd assume replacing the shortened links.

yes :-)
Comment 12 Daniele Scasciafratte 2012-07-28 23:16:13 UTC
any news?
Comment 13 Daniele Scasciafratte 2013-05-29 09:26:41 UTC
choqok is the only twitter client with the qt but respect to other it's outdated....
this feature it's very important!
Comment 14 markuss 2013-07-01 12:43:38 UTC
*** Bug 303161 has been marked as a duplicate of this bug. ***
Comment 15 Eugene Shalygin 2014-11-30 19:19:27 UTC
Created attachment 89785 [details]
longurl.org instead of redirection

I use Webkit in Konqueror and thus Choqok uses it also in the Untiny plugin. However, redirection support in Webkit is absent and thus untiny, which relies on it, does not work. So I've copied code that uses longurl.org from ktp-text-ui
Comment 16 Mehrdad Momeny 2014-12-03 10:20:45 UTC
(In reply to Eugene Shalygin from comment #15)
> Created attachment 89785 [details]
> longurl.org instead of redirection
> 
> I use Webkit in Konqueror and thus Choqok uses it also in the Untiny plugin.
> However, redirection support in Webkit is absent and thus untiny, which
> relies on it, does not work. So I've copied code that uses longurl.org from
> ktp-text-ui

Good job, but please make a new plugin instead of replacing the untiny plugin code! This way we can keep the untiny plugin for where it's usable.
And please use KDE review board for posting the patch.

Thanks.
Comment 17 Eugene Shalygin 2014-12-11 17:03:12 UTC
https://git.reviewboard.kde.org/r/121451/
Comment 18 Andrea Scarpino 2014-12-15 17:10:29 UTC
Git commit cea60c585dc77b7cf49b909ed98ab5ed6f165e64 by Andrea Scarpino.
Committed on 15/12/2014 at 17:04.
Pushed by scarpino into branch 'master'.

Add longurl expansion url plugin

Disable the unTiny plugin as this does the same thing, but better™

REVIEW: 121451
FIXED-IN: 1.5

M  +2    -1    plugins/CMakeLists.txt
A  +19   -0    plugins/longurl/CMakeLists.txt
A  +22   -0    plugins/longurl/choqok_longurl.desktop
A  +197  -0    plugins/longurl/longurl.cpp     [License: GPL (v2/3)]
A  +89   -0    plugins/longurl/longurl.h     [License: GPL (v2/3)]

http://commits.kde.org/choqok/cea60c585dc77b7cf49b909ed98ab5ed6f165e64