/safeurl

Link analyzer on Python

Primary LanguagePythonMIT LicenseMIT

SafeUrl: link analyzer on Python

Simple and clever analyzer, decoder, encoder ... urls on python, using requests

https://travis-ci.org/FrodoTheTrue/safeurl.svg?branch=master https://coveralls.io/repos/github/FrodoTheTrue/safeurl/badge.svg?branch=master

Installation

$ pip install safeurl

Usage

Easy way to get real url:

from safeurl.core import getRealURL
getRealURL('http://bit.ly/1gaiW96')
# https://www.yandex.ru/

from safeurl.core import getRealURL
getRealURL(['http://bit.ly/1gaiW96', 'http://bit.ly/1gaiW96'])
# ['https://www.yandex.ru/', 'https://www.yandex.ru/']

Аlso you can find broken urls:

from safeurl.core import getRealURL
getRealURL('http://bit.ly.wrong/wrong')
# 'Failed'

from safeurl.core import getRealURL
getRealURL(['http://bit.ly.wrong/wrong', 'http://bit.ly/1gaiW96'])
# ['Failed', 'https://www.yandex.ru/']

# test info