unshortenit
Unshortens ad-based urls and 301 redirects. Supports adf.ly, lnx.lu, linkbucks.com, and adfoc.us
Features
- Supports unshortening the following ad-based shortners:
Adf.ly and related subdomains (PyV8 library required)
Custom adf.ly domains by passing the type=’adfly’ parameter
Lnx.lu
Linkbucks.com and related subdomains
Adfoc.us
Supports any 301 redirected urls
Python 2.7 and 3.3 support
Usage
import unshortenit unshortened_uri,status = unshortenit.unshorten(’http://ul.to’)
> unshortenit.unshorten will return a tuple (unshortened_uri,status)
> unshortened_uri will contain the unshortened uri. If you pass in a non-shortener url it will return the original url. > status will contain the status code or any error messages
Installation
pip install unshortenit
In order to enable adf.ly support you will need to install the PyV8 library. This will need to be compiled from source.
- #### Python 2.7 PyV8 Instructions:
sudo apt-get install gyp subversion build-essential libboost-python-dev python2.7-dev libboost-system-dev libboost-thread-dev> svn checkout http://v8.googlecode.com/svn/trunk/ v8 svn checkout http://pyv8.googlecode.com/svn/trunk/ pyv8-read-only cd v8 make dependencies cd .. cd pyv8-read-only V8_HOME=/path/to/v8 python2.7 setup.py build * This will not work inside a virtualenv. Make sure to deactivate your virtualenv first. python2.7 setup.py install * You can run this inside your virtualenv to install it.
- #### Python 3.3 PyV8 Instructions:
sudo apt-get install gyp subversion build-essential libboost-python-dev python3.3-dev libboost-system-dev libboost-thread-dev svn checkout http://v8.googlecode.com/svn/trunk/ v8 svn checkout http://pyv8.googlecode.com/svn/trunk/ pyv8-read-only cd v8 make dependencies cd .. cd pyv8-read-only sed -i.bak s/'boost_python'/'boost_python-py33'/ setup.py V8_HOME=/path/to/v8 python3.3 setup.py build * This will not work inside a virtualenv. Make sure to deactivate your virtualenv first. python3.3 setup.py install * You can run this inside your virtualenv to install it.
History
0.1.0 (2013-10-08)
First release.
0.1.1 (2013-10-12)
Added support for custom adf.ly domains via the type=’adfly’ variable.
0.1.2 (2013-10-12)
Fixed bug with t.co not working.
Metadata
Release files for unshortenit 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| unshortenit-0.1.2.tar.gz | 11.1 kB | Without provenance | Details |
Release files / unshortenit-0.1.2.tar.gz
| Download URL | unshortenit-0.1.2.tar.gz |
|---|---|
| Size | 11.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
308209a3b94541183bf0bbd54765295ee993f81eb5d79655350940c40f4c6cdb
|
|
BLAKE2b-256 checksum How to use checksums |
8d5a7e41a7ee888bb6b011b30a15f26f7b0e3e26608c74df24a22ff4d8b50084
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for unshortenit 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.