mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-15 01:53:09 +00:00
See ChangeLog
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@54 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
58ec06b119
commit
b81ae322d3
4 changed files with 27 additions and 3 deletions
|
|
@ -1,5 +1,6 @@
|
|||
30.3.2000
|
||||
* support for NNTP news: links
|
||||
* forgot to put lc.fcgi and lc.sz_fcgi in release
|
||||
|
||||
30.3.2000 Version 1.1.4
|
||||
* fixed missing self.mime assignment in HttpUrlData.py
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ include TODO
|
|||
include linkchecker
|
||||
include linkchecker.bat
|
||||
include lc.cgi
|
||||
include lc.fcgi
|
||||
include lc.sz_fcgi
|
||||
include Makefile
|
||||
include create.sql
|
||||
include debian/rules
|
||||
|
|
|
|||
|
|
@ -78,12 +78,17 @@ class Configuration(UserDict.UserDict):
|
|||
self.urlCache_has_key = self.urlCache_has_key_NoThreads
|
||||
self.urlCache_get = self.urlCache_get_NoThreads
|
||||
self.urlCache_set = self.urlCache_set_NoThreads
|
||||
self.urlCacheLock = None
|
||||
self.robotsTxtCache_has_key = self.robotsTxtCache_has_key_NoThreads
|
||||
self.robotsTxtCache_get = self.robotsTxtCache_get_NoThreads
|
||||
self.robotsTxtCache_set = self.robotsTxtCache_set_NoThreads
|
||||
self.robotsTxtCacheLock = None
|
||||
self.log_newUrl = self.log_newUrl_NoThreads
|
||||
self.logLock = None
|
||||
self.urls = []
|
||||
self.threader = None
|
||||
self.connectNntp = self.connectNntp_NoThreads
|
||||
self.dataLock = None
|
||||
|
||||
def enableThreading(self, num):
|
||||
import Queue,Threader
|
||||
|
|
@ -107,6 +112,8 @@ class Configuration(UserDict.UserDict):
|
|||
self.logLock = Lock()
|
||||
self.urls = Queue.Queue(0)
|
||||
self.threader = Threader.Threader(num)
|
||||
self.connectNntp = self.connectNntp_Threads
|
||||
self.dataLock = Lock()
|
||||
|
||||
def hasMoreUrls_NoThreads(self):
|
||||
return len(self.urls)
|
||||
|
|
@ -158,7 +165,19 @@ class Configuration(UserDict.UserDict):
|
|||
if not self.data["quiet"]: self.data["log"].endOfOutput()
|
||||
for log in self.data["fileoutput"]:
|
||||
log.endOfOutput()
|
||||
|
||||
|
||||
def connectNntp_NoThreads(self):
|
||||
if not self.data.has_key("nntp"):
|
||||
import nntplib
|
||||
self.data["nntp"] = nntplib.NNTP(self.data["nntpserver"])
|
||||
|
||||
def connectNntp_Threads(self):
|
||||
if not self.data.has_key("nntp"):
|
||||
import nntplib
|
||||
self.dataLock.acquire()
|
||||
self.data["nntp"] = nntplib.NNTP(self.data["nntpserver"])
|
||||
self.dataLock.release()
|
||||
|
||||
def hasMoreUrls_Threads(self):
|
||||
return not self.urls.empty()
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import nntplib,re,string
|
||||
import re,string
|
||||
from HostCheckingUrlData import HostCheckingUrlData
|
||||
from UrlData import LinkCheckerException
|
||||
|
||||
|
|
@ -17,7 +17,9 @@ class NntpUrlData(HostCheckingUrlData):
|
|||
def checkConnection(self, config):
|
||||
if not config["nntpserver"]:
|
||||
self.setWarning("No NNTP server specified, checked only syntax")
|
||||
nntp = nntplib.NNTP(config["nntpserver"])
|
||||
# only connect once
|
||||
config.connectNntp()
|
||||
nntp = config["nntp"]
|
||||
resp,count,first,last,name = nntp.group(self.host)
|
||||
self.setInfo("Group %s has %s articles, range %s to %s" % \
|
||||
(name, count, first, last))
|
||||
|
|
|
|||
Loading…
Reference in a new issue