diff options
| author | Markus Heiser <markus.heiser@darmarit.de> | 2025-01-28 20:30:07 +0100 |
|---|---|---|
| committer | Markus Heiser <markus.heiser@darmarIT.de> | 2025-01-29 05:04:41 +0100 |
| commit | a235c54f8c8442242fe727908162e5ece8739b5a (patch) | |
| tree | 5884daa5c99b86b419c3f630780eb0373a1122f0 /searx/result_types | |
| parent | df3344e5d5fdfd2425324d5e10e8c8e5104963b0 (diff) | |
[mod] rudimentary implementation of a MainResult type
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/result_types')
| -rw-r--r-- | searx/result_types/_base.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/searx/result_types/_base.py b/searx/result_types/_base.py index 66e31c7f2..1496cbd2c 100644 --- a/searx/result_types/_base.py +++ b/searx/result_types/_base.py @@ -114,6 +114,25 @@ class Result(msgspec.Struct, kw_only=True): return {f: getattr(self, f) for f in self.__struct_fields__} +class MainResult(Result): # pylint: disable=missing-class-docstring + + # open_group and close_group should not manged in the Result class (we should rop it from here!) + open_group: bool = False + close_group: bool = False + + title: str = "" + """Link title of the result item.""" + + content: str = "" + """Extract or description of the result item""" + + img_src: str = "" + """URL of a image that is displayed in the result item.""" + + thumbnail: str = "" + """URL of a thumbnail that is displayed in the result item.""" + + class LegacyResult(dict): """A wrapper around a legacy result item. The SearXNG core uses this class for untyped dictionaries / to be downward compatible. |