コード例 #1
0
def shorten_url_with_bitly(url, title):
    log("shortening url with bitly")
    c = BitlyConnection(access_token=BITLY_TOKEN)
    response = c.shorten(url)
    c.user_link_edit(response["url"], "title", title=title)
    log("new bitly link:" + response["url"])
    return response["url"]
コード例 #2
0
def shorten_url_with_bitly(url, title):
    log("shortening url with bitly")
    c = BitlyConnection(access_token=BITLY_TOKEN)
    response = c.shorten(url)
    c.user_link_edit(response["url"],"title",title=title)
    log("new bitly link:"+response["url"])
    return response["url"]