Skip to main content

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

Release files for siegfried 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for siegfried 0.2.4
File Size Uploaded
siegfried-0.2.4.tar.gz 8.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for siegfried 0.2.4
File Interpreter ABI Platform
siegfried-0.2.4.macosx-10.9-intel.exe Details

Total release size: 85.3 kB

Release files / siegfried-0.2.4.tar.gz

Download URL siegfried-0.2.4.tar.gz
Size 8.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ec446f4a6a4b3397c75a6225b8722a606cdedbb5b79f158577ca05ead113c799
BLAKE2b-256 checksum
How to use checksums
b22ed882416c1cbb5292a18b1ec41904efe26cc0ac62bf9eb68237e643a10867
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / siegfried-0.2.4.macosx-10.9-intel.exe

Download URL siegfried-0.2.4.macosx-10.9-intel.exe
Size 77.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a922b98e935367cbdb6f9b779ba00605a07afc33baca970062c94b6ac52891f4
BLAKE2b-256 checksum
How to use checksums
c93b01e0baac7a96956475028149a5a7677cd8ac15a57dbcdd04e9617b73b271
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2.4 This release

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.9

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page