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

Uploaded Source

Built Distribution

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

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for siegfried-0.2.4.tar.gz
Algorithm Hash digest
SHA256 ec446f4a6a4b3397c75a6225b8722a606cdedbb5b79f158577ca05ead113c799
MD5 b3b81cb7779f1a6f5aab8c4a3d504eaf
BLAKE2b-256 b22ed882416c1cbb5292a18b1ec41904efe26cc0ac62bf9eb68237e643a10867

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for siegfried-0.2.4.macosx-10.9-intel.exe
Algorithm Hash digest
SHA256 a922b98e935367cbdb6f9b779ba00605a07afc33baca970062c94b6ac52891f4
MD5 881a583b9fb860989a67ef18c6e31ed4
BLAKE2b-256 c93b01e0baac7a96956475028149a5a7677cd8ac15a57dbcdd04e9617b73b271

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