コード例 #1
0
def skroc(url):
    """ Extracts the destination URL of skroc.pl (and it's domains) shortened
        URLs. """
    if url.endswith("/") or url.endswith("!"):
        url = url[:-1]
    response = append_char(url, "!", group_marker="__skroc__")
    return response
コード例 #2
0
def urlie(url):
    """ Extracts the destination URL of url.ie shortened URLs. """
    if url.endswith("/") or url.endswith("+"):
        url = url[:-1]
    response = append_char(url, "+")
    return response
コード例 #3
0
def bitly(url):
    """ Extracts either bit.ly or shortened URLs, which make use of their API,
        destination URLs. """
    response = append_char(url, "+", group_marker="__bitly__")
    return response