DjangoAdminHackers / django-linkcheck

An app that will analyze and report on links in any model that you register with it. Links can be bare (urls or image and file fields) or embedded in HTML (linkcheck handles the parsing). It's fairly easy to override methods of the Linkcheck object should you need to do anything more complicated (like generate URLs from slug fields etc).
BSD 3-Clause "New" or "Revised" License
75 stars 26 forks source link

findlinks command not deleting Links #101

Closed sbor23 closed 1 year ago

sbor23 commented 4 years ago

We're using the (not documented) setting LINKCHECK_DISABLE_LISTENERS = True to not have too much spam for normal save / delete during operation and testing.

We have a routine to call findlinks and subsequently checklinks periodically. Now to our surprise this includes Links to previously deleted instances.

https://github.com/DjangoAdminHackers/django-linkcheck/blob/a75cd57502a9fb1eac5e0a49c23f19a69a3ad4cd/linkcheck/utils.py#L142 doesn't seem to care about deleted links at all, but it will clean up deleted Urls.

Is this behaviour intended?

andybak commented 4 years ago

@fruitschen ?

timobrembeck commented 2 years ago

We face the same issue and just drop the complete link database before scanning again - this makes it a bit cumbersome to restore the "ignored" status and leads to unnecessary re-checks of links, so I would be grateful if the findlinks could remove links which are no longer present in the content.