From b4279e243bbdf00054bb9c724d9fb4db2766068e Mon Sep 17 00:00:00 2001 From: Adrian Date: Sun, 9 Aug 2026 11:13:29 +0200 Subject: [PATCH] Document that process_value runs before allow and deny (#7940) --- scrapy/linkextractors/lxmlhtml.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scrapy/linkextractors/lxmlhtml.py b/scrapy/linkextractors/lxmlhtml.py index 3fb741d7a..46ac39a28 100644 --- a/scrapy/linkextractors/lxmlhtml.py +++ b/scrapy/linkextractors/lxmlhtml.py @@ -282,6 +282,12 @@ class LxmlLinkExtractor: if m: return m.group(1) + ``process_value`` is called before the filtering parameters, such as + ``allow`` and ``deny``, which match the value that it returns. To drop + links based on their final URL, use the ``process_links`` parameter of + :class:`~scrapy.spiders.Rule`, which only receives links that those + parameters kept. + :type process_value: collections.abc.Callable :param strip: whether to strip whitespaces from extracted attributes.