def handle_data(self, data):
        """Callback when the data of a tag has been collected."""
        # Only process the data when we are in an active a tag and have an URL.
        if not self.active_url:
            return

        # The visible text can have a final slash so strip it off
        if data.strip('/') == self.active_url:
            self.entries.append(self.active_url)
Callback when the data of a tag has been collected.