diff --git a/linkcheck/__init__.py b/linkcheck/__init__.py index 1f21b00..798bd82 100644 --- a/linkcheck/__init__.py +++ b/linkcheck/__init__.py @@ -152,9 +152,14 @@ def get_urls_from_field_list(self, obj, field_list): url = self.extract_url_from_field(obj, field_name) if field_name in self.ignore_empty and not url: continue - urls.append((field_name, '', url)) + link_text = self.get_link_text_for_field(obj, field_name) + urls.append((field_name, link_text, url)) return urls - + + def get_link_text_for_field(self, obj, field_name): + # implement this in subclasses + return '' + def urls(self, obj): urls = []