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

Uploaded Source

Built Distribution

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

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for siegfried-0.1.4.tar.gz
Algorithm Hash digest
SHA256 2ff95b9ee1e64cad277659637c67951b911b545e0671956ad80b5128821e4495
MD5 9575889f2123883dfb92a6999d9fe73c
BLAKE2b-256 ec1766415730a0ed8edfb0e5847294d9ec4a1de90764aa15cc8469474d46049a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for siegfried-0.1.4.macosx-10.9-intel.exe
Algorithm Hash digest
SHA256 faa09845508d597210d86c924d30d92c3c7de5820079972b31c381221fbf427a
MD5 e5697b94543e77916cee1d3e86ca2ea0
BLAKE2b-256 75f5b3e40f3280362df84fb73f64c373e3a67a309f5a586dd07ba209a203226c

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