Exemplo n.º 1
0
def ParseUrlProc(res):
    url = res.group("url")
    if "t.co" in url:
        new_url = url.split("/")[-1]
    else:
        new_url = url
    return '<a href="%s/tco/%s">%s</a>' % (get_root_path(), new_url, url)
Exemplo n.º 2
0
def ParseReplyProc(res):
    reply = res.group("reply")
    return '<a href="%s/%s/">%s</a>' % (get_root_path(), reply[1:], reply)