Skip to main content

Tools for taming lynx.

Project description

travis-img 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


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.2.2.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

siegfried-0.2.2.macosx-10.9-intel.exe (77.2 kB view details)

Uploaded Source

File details

Details for the file siegfried-0.2.2.tar.gz.

File metadata

  • Download URL: siegfried-0.2.2.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for siegfried-0.2.2.tar.gz
Algorithm Hash digest
SHA256 0dc52d4a1cdfd38266b5e1603a594aa23756bbdbc63a1a059e457c297e0221ce
MD5 dba8f5b4311c1f7414c0e19a742985d7
BLAKE2b-256 0cc89784ca5e38a832cc330c3816777da5a192737ba16f2f946907eefc8d3bd4

See more details on using hashes here.

File details

Details for the file siegfried-0.2.2.macosx-10.9-intel.exe.

File metadata

File hashes

Hashes for siegfried-0.2.2.macosx-10.9-intel.exe
Algorithm Hash digest
SHA256 33361652d0c8b1f781c76828e7abc297ab786b3370bd9e0f0a718f711e3676b3
MD5 0c5af19f738db4c4276c9539e673659b
BLAKE2b-256 862530f67ca751954460e7953282c133d0abe186d3b2fa3cd5a1e7c4c98db343

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page