I'm extracting URLs from tweets using Twitter APIs with a Python lib named Twython. I use home_timeline API and look at entities
to search for URLs.
Normally, the links in entities
are correct. However, in some cases, the links are wrong. For example, this is a tweet from account @WWF-Philippines
:
When I hover the cursor over the highlighted link, it shows shortened_url1
(I cannot put here because Stackoverflow doesn't allow) on the status bar. If I click on the link, it opens an external article. However, if I use Twitter API to query the corresponding tweet, here is the tweet I get:
Need a guide to properly enjoy the great outdoors while minimizing human impact? This list is for you!\xe2\x80\xa6 shortened_url2
You can see the shortened_url2 here is different from the true link (shortened_url1) shown when hovering the cursor. If I follow the shortened_url2, it opens the same tweet. The link in the entities
part is the same with this wrong link (shortened_url2).
So what's wrong with Twitter APIs here? Thanks.