コード例 #1
0
def urlgator(url):
    """ Extracts the destination URL of urlgator.com or myurl.in shortened URLs. """
    # myurl.in URLs redirect to urlgator.com
    up = urlparse(url)
    new_url = "{0}://urlgator.com{1}".format(up.scheme, up.path)
    response = generic_extraction(new_url, group_marker="__urlgator__")
    response.url = url
    return response
コード例 #2
0
def linkasa(url):
    """ Extracts the destination URL of linkasa.com or linkasa.fr shortened URLs. """
    new_url = url
    if "preview" not in url or "www." not in url:
        up = urlparse(new_url)
        new_url = "{0}://www.{1}/preview{2}".format(up.scheme, up.netloc, up.path)
    response = generic_extraction(new_url, group_marker="__linkasa__")
    return response
コード例 #3
0
def linkbunch(url):
    """ Linkbun.ch shortened links, can contain multiple URLs, these are extracted
        when issuing this method. """
    response = generic_extraction(url, group_marker="__linkbunch__")
    return response
コード例 #4
0
def kickmeto(url):
    """ Extracts the destination URL of one of kickme.to's URL shortened domains. """
    response = generic_extraction(url, group_marker="__kickmeto__")
    return response
コード例 #5
0
def hidelinks(url):
    """ Extract the destination URL of hidelinks.com shortened URLs. """
    return generic_extraction(url, allow_redir=True)
コード例 #6
0
def zima(url):
    """ Extracts the destination URL of one of the domains of the zi.ma shortener
        service. """
    response = generic_extraction(url, allow_redir=True, group_marker="__zima__")
    return response
コード例 #7
0
def tinyarrows(url):
    """ Handles the long_url extraction for tinyarrows link shortener, all domains
        are supported of their service. """
    response = generic_extraction(url, allow_redir=True, group_marker="__tinyarrows__")
    return response
コード例 #8
0
def cutlv(url):
    """ Obtains the destination URL of a cut.lv shortened URL. """
    response = generic_extraction(url, allow_redir=True)
    return response