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
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
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
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
def hidelinks(url): """ Extract the destination URL of hidelinks.com shortened URLs. """ return generic_extraction(url, allow_redir=True)
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
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
def cutlv(url): """ Obtains the destination URL of a cut.lv shortened URL. """ response = generic_extraction(url, allow_redir=True) return response