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.5.tar.gz
(8.0 kB
view details)
Built Distribution
File details
Details for the file siegfried-0.1.5.tar.gz
.
File metadata
- Download URL: siegfried-0.1.5.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | afdd3e3a1c7b435b809ffdb33e29a86263b8bdcf9b8ab9533c42116f9f36ecae |
|
MD5 | f0e4c7f9896f8a1b354f7c5b4baee86f |
|
BLAKE2b-256 | 3da9ea64f3060936907809fb2694df517f00a671bd80d9f29bddf756a21ce17d |
File details
Details for the file siegfried-0.1.5.macosx-10.9-intel.exe
.
File metadata
- Download URL: siegfried-0.1.5.macosx-10.9-intel.exe
- Upload date:
- Size: 77.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4cce25d1168357208c7a36fa87f1f03e65571a8e74b19b118f0a91c08bc30ce2 |
|
MD5 | d465c8d9246b4aa98f44e371fbd4b5f9 |
|
BLAKE2b-256 | 3887da0d00f87c7d536f8a3661bd158251adda27f5db6b289cfa9749f078ad91 |