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

Uploaded Source

Built Distribution

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

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for siegfried-0.1.2.tar.gz
Algorithm Hash digest
SHA256 feb6b982b7b8b2fa05833395a51dc6a8fefb62cea7112b9051c50fc16f4846ad
MD5 f4e2bca60334082bfd5a63d4608d8f34
BLAKE2b-256 6cb029e779c360631ba378002bd18c4bed4346e7281aed276a81b3bbfee7ecb8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for siegfried-0.1.2.macosx-10.9-intel.exe
Algorithm Hash digest
SHA256 3749af7e55fc950c36114ab7fb594b3cd43d9a497366c081115da83f9bcc5d22
MD5 80cae9b56862dc152935b8fe0e64a720
BLAKE2b-256 a3323903799949995e9a904e08dbe56e96578d6b1893d9a60cf8ce3ca194311a

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