예제 #1
0
파일: twitcn_filters.py 프로젝트: mitnk/mc
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)
예제 #2
0
파일: twitcn_filters.py 프로젝트: mitnk/mc
def ParseReplyProc(res):
    reply = res.group("reply")
    return '<a href="%s/%s/">%s</a>' % (get_root_path(), reply[1:], reply)