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

Uploaded Source

Built Distribution

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

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for siegfried-0.0.9.tar.gz
Algorithm Hash digest
SHA256 e95ec6c3809dd24dca5f70af001559a3f776b63ed19376431c912b36a2347c42
MD5 0e634fdb0fc3acd2b91b6a397bb923f1
BLAKE2b-256 42bfdf56ac56147ebc1897cd0ea738496e96acefb997c85a9f61ab07b145fff2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for siegfried-0.0.9.macosx-10.9-intel.exe
Algorithm Hash digest
SHA256 039758614c84d1e3f98ab1094cdcc3aead5d2f332db1f8b377a1f6ef2195d5f4
MD5 3f4d9a1f0f96cfabbb847accc987dc05
BLAKE2b-256 c6563b41bf84e07f09aa8a3b99416a48586db4b0271d36786257444a7af7cc27

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