From 88c14cc16a25027fcee201a48c323441c2220aec Mon Sep 17 00:00:00 2001 From: vyshnaviTN Date: Tue, 6 Jan 2026 21:17:25 +0530 Subject: [PATCH] docs:clarify return behaviour when no elements are found --- requests_html.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/requests_html.py b/requests_html.py index cd341de..3f5c68a 100644 --- a/requests_html.py +++ b/requests_html.py @@ -201,6 +201,10 @@ def find(self, selector: str = "*", *, containing: _Containing = None, clean: bo If ``first`` is ``True``, only returns the first :class:`Element ` found. + If no matching elements are found: + - returns ``None`` when ``first`` is ``True`` + - returns an empty list when ``first`` is ``False`` + """ # Convert a single containing into a list.