Class History
Stores previously found dead links.
The URLs are dict's keys, and values are lists of tuples where each tuple
represents one time the URL was found dead. Tuples have the form
(title, date, error) where title is the wiki page where the URL was found,
date is an instance of time, and error is a string with error code and
message.
We assume that the first element in the list represents the first time we
found this dead link, and the last element represents the last time.
Example:
dict = {
'http://www.example.org/page': [
('WikiPageTitle', DATE, '404: File not found'),
('WikiPageName2', DATE, '404: File not found'),
]
Method Summary |
|
__init__(self)
|
|
log(self,
url,
error,
containingPage)
|
|
save(self)
|
|
setLinkAlive (self,
url)
If the link was previously found dead, removes it from the .dat file
and returns True, else returns False. |
|
setLinkDead(self,
url,
error,
containingPage)
|
setLinkAlive(self,
url)
If the link was previously found dead, removes it from the .dat file
and returns True, else returns False.
-
|