1

I am using the python-twitter module to get my most recent twitter status updates:

for i in range(0, limit):
        tweet = twitter.Api().GetUserTimeline(TWITTER_USERNAME)[i]
        tweet.date = datetime.strptime( tweet.created_at, "%a %b %d %H:%M:%S +0000 %Y" )
        tweets.append(tweet)

It's working fine, but the tweet.text property does not wrap the URL in a tags so they are clickable. I had a look through the python-twitter documentation but it doesn't give any specific advise on getting a status with the URLs as clickable urls.

I'm sure there is a function in the library to do this, does anyone know how?

Hanpan
  • 10,013
  • 25
  • 77
  • 115

1 Answers1

1

You'll likely have to parse the text to find and mark up the URLs yourself. Here's a question about that:

What's the cleanest way to extract URLs from a string using Python?

Community
  • 1
  • 1
Spike
  • 5,040
  • 5
  • 32
  • 47