Main Results
class searx.result_types._base.MainResult(template: str = 'default.html', title: str = '', content: str = '', img_src: str = '', iframe_src: str = '', audio_src: str = '', thumbnail: str = '', publishedDate: datetime | None = None, pubdate: str = '', length: timedelta | None = None, views: str = '', author: str = '', metadata: str = '', priority: Literal['', 'high', 'low']='', engines: set[str] = <factory>, open_group: bool = False, close_group: bool = False, positions: list[int] = <factory>, score: float = 0, category: str = '', *, url: str | None = None, engine: str | None = '', parsed_url: ParseResult | None = None)[source] : Base class of all result types displayed in area main results.
template: [str](https://docs.python.org/3/builtins/stdtypes.html#str)
: Name of the template used to render the result.
By default is used.
title: [str](https://docs.python.org/3/builtins/stdtypes.html#str)
: Link title of the result item.
content: [str](https://docs.python.org/3/builtins/stdtypes.html#str)
: Extract or description of the result item
img\_src: [str](https://docs.python.org/3/builtins/stdtypes.html#str)
: URL of a image that is displayed in the result item.
iframe\_src: [str](https://docs.python.org/3/builtins/stdtypes.html#str)
: URL of an embedded `<iframe>` / the frame is collapsible.
To convert a standard video URL from a widely know video services into its
embed format, have a look at [`searx.utils.get_embedded_stream_url`](https://docs.searxng.org/src/searx.utils.html#searx.utils.get_embedded_stream_url).
audio\_src: [str](https://docs.python.org/3/builtins/stdtypes.html#str)
: URL of an embedded `<audio controls>`.
thumbnail: [str](https://docs.python.org/3/builtins/stdtypes.html#str)
: URL of a thumbnail that is displayed in the result item.
publishedDate: [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime) | [None](https://docs.python.org/3/builtins/constants.html#None)
: The date on which the object was published.
pubdate: [str](https://docs.python.org/3/builtins/stdtypes.html#str)
: String representation of [`MainResult.publishedDate`](#searx.result_types._base.MainResult.publishedDate)
Deprecated: it is still partially used in the templates, but will one day be
completely eliminated.
length: [timedelta](https://docs.python.org/3/library/datetime.html#datetime.timedelta) | [None](https://docs.python.org/3/builtins/constants.html#None)
: Playing duration in seconds.
views: [str](https://docs.python.org/3/builtins/stdtypes.html#str)
: View count in humanized number format.
author: [str](https://docs.python.org/3/builtins/stdtypes.html#str)
: Author of the title.
metadata: [str](https://docs.python.org/3/builtins/stdtypes.html#str)
: Miscellaneous metadata.
priority: [Literal](https://docs.python.org/3/library/typing.html#typing.Literal)['', 'high', 'low']
: The priority can be set via [Hostnames](https://docs.searxng.org/dev/plugins/hostnames.html#hostnames-plugin), for example.
engines: [set](https://docs.python.org/3/builtins/stdtypes.html#set)[[str](https://docs.python.org/3/builtins/stdtypes.html#str)]
: In a merged results list, the names of the engines that found this result
are listed in this field.
normalize\_result\_fields()[[source]](https://docs.searxng.org/_modules/searx/result_types/_base.html#MainResult.normalize_result_fields)
: Normalize fields `url` and `parse_sql`.
- If field `url` is set and field `parse_url` is unset, init
`parse_url` from field `url`. The `url` field is initialized
with the resulting value in `parse_url`, if `url` and
`parse_url` are not equal.
Copyright © SearXNG team
Made with Furo
