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

Uploaded Source

Built Distribution

siegfried-0.1.1.macosx-10.9-intel.exe (77.1 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for siegfried-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9934697976e207e3952a727af10168e3520c50ec22124e82a2f6dbb931d73570
MD5 09434c4a446fe33b04d3ad2c8a6b8536
BLAKE2b-256 e48034e0f973f085484bfe243d4dfef3cdaa7115f5c17155625994886d1fc480

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for siegfried-0.1.1.macosx-10.9-intel.exe
Algorithm Hash digest
SHA256 ad5e1dc07433e74b6ba5bed3a3799f8e65589964671e5dec901a59f8eccb98e7
MD5 a7e0493ee443c213124348c32ed31156
BLAKE2b-256 722ed16dae9e2a63f406d8e27df8e3e37e6aae67e00a963dbb63002089bbcd8c

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