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.1.0.tar.gz
(7.9 kB
view details)
Built Distribution
File details
Details for the file siegfried-0.1.0.tar.gz
.
File metadata
- Download URL: siegfried-0.1.0.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 435a8b2824c43890ab0a480584c2379dc6c35816eb79bb596f3f994219333ca4 |
|
MD5 | 999ac5317685e2c5c2542aff949704d6 |
|
BLAKE2b-256 | 7996484d57f50f178bcb07058c37b82bb05ac009465735e63d174868d04dce33 |
File details
Details for the file siegfried-0.1.0.macosx-10.9-intel.exe
.
File metadata
- Download URL: siegfried-0.1.0.macosx-10.9-intel.exe
- Upload date:
- Size: 77.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f79dae9cc426b29b1b01db80fd4a7971b1017ba9415b5383aef96b6c38da4a2 |
|
MD5 | 4dbe12bde824aa73c43a345a4fc898c8 |
|
BLAKE2b-256 | 4297f5fc168ea2ae635f60067ba3a6a2459510bd465caddb3fa73f5e3b7e292a |