Tools for taming links.
Project Description
siegfried ====================== Tools for taming lynx.
Install
pip install siegfried
Test
requires nose
nosetests
Usage
This module contains various methods that are used throughout newslnyx. but the main functions are unshorten_url, is_article_url, and prepare_url:
from siegfried import ( unshorten_url, is_article_url, prepare_url ) print unshorten_url('bit.ly/1j3SrUC') # http://towcenter.org/blog/tow-fellows-brian-abelson-and-michael-keller-to-study-the-impact-of-journalism/ print is_article_url( 'http://towcenter.org/blog/tow-fellows-brian-abelson-and-michael-keller-to-study-the-impact-of-journalism' ) # True print is_article_url( 'http://towcenter.org/blog/tow-fellows-brian-abelson-and-michael-keller-to-study-the-impact-of-journalism', pattern = r'.*towcenter\.org/blog/.*' ) # True import re pattern = re.compile(r'.*towcenter\.org/blog/.*') print is_article_url( 'http://towcenter.org/blog/tow-fellows-brian-abelson-and-michael-keller-to-study-the-impact-of-journalism', pattern = pattern ) # True print prepare_url( 'http://towcenter.org/blog/tow-fellows-brian-abelson-and-michael-keller-to-study-the-impact-of-journalism/?q=lfjad&f=lkfdjsal' ) # http://towcenter.org/blog/tow-fellows-brian-abelson-and-michael-keller-to-study-the-impact-of-journalism
Release history Release notifications
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size & hash SHA256 hash help | File type | Python version | Upload date |
---|---|---|---|
siegfried-0.0.6.macosx-10.9-intel.exe (72.3 kB) Copy SHA256 hash SHA256 | Windows Installer | any | Jun 6, 2014 |
siegfried-0.0.6.tar.gz (7.9 kB) Copy SHA256 hash SHA256 | Source | None | Jun 6, 2014 |