From e04f72bdd8076cdfeb90b1cb3aba7a2f34c316b2 Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Sat, 16 Jul 2005 15:35:22 +0000 Subject: move functionality of rptlib.py to __init__.py so that we can just use the plugins package git-svn-id: http://arthurdejong.org/svn/webcheck/webcheck@64 86f53f14-5ff3-0310-afe5-9b438ce3f40c --- plugins/badlinks.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/badlinks.py') diff --git a/plugins/badlinks.py b/plugins/badlinks.py index 1081cc4..85f1aa5 100644 --- a/plugins/badlinks.py +++ b/plugins/badlinks.py @@ -27,8 +27,8 @@ __version__ = '1.1' __description__ = 'These links had problems with retreival during the ' \ 'crawling of the website.' -import rptlib import config +import plugins import xml.sax.saxutils HTTP_STATUS_CODES = {'100':"Continue", @@ -83,14 +83,14 @@ def generate(fp,site): '
  • \n' \ ' %(badurl)s\n' \ '
    %(status)s
    \n' \ - % { 'badurl': rptlib.make_link(link.URL,link.URL), + % { 'badurl': plugins.make_link(link.URL,link.URL), 'status': xml.sax.saxutils.escape(status) }) # present a list of parents link.parents.sort() - rptlib.print_parents(fp,link,' ') + plugins.print_parents(fp,link,' ') # add a reference to the problem map for parent in site.linkMap[url].parents: plink=site.linkMap[parent] - rptlib.add_problem("Bad Link: " + link.URL, plink) + plugins.add_problem("Bad Link: " + link.URL, plink) fp.write('
  • \n') fp.write(' \n') -- cgit v1.2.3