Tools for taming lynx.
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
siegfried-0.0.7.tar.gz
(7.9 kB
view details)
Built Distribution
File details
Details for the file siegfried-0.0.7.tar.gz
.
File metadata
- Download URL: siegfried-0.0.7.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 831837a807f0dda5eb870fe56ecd6309ef2bade0b983a1874f29f987882c1604 |
|
MD5 | 39a76c904d82012adc0db4934bc42065 |
|
BLAKE2b-256 | 346f29de494a95945d3c883645c8d7bd40782efa4e96714ca4a15bce4d608823 |
File details
Details for the file siegfried-0.0.7.macosx-10.9-intel.exe
.
File metadata
- Download URL: siegfried-0.0.7.macosx-10.9-intel.exe
- Upload date:
- Size: 72.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f1e24495a35fc5e5677acc950b73974fe2941552339de0251d57905e4b67b43 |
|
MD5 | c1dd767d6b485d3140b4ac3d7f907b68 |
|
BLAKE2b-256 | f99a2ae9b9a8ecd433c66b048d873b00210522ffcd7eed98acd6ee2ccf10a566 |