Snippet
- class Snippet(content=None, images=None, language=None, next_snippet_hash=None, prev_snippet_hash=None, snippet_hash=None, statistics=None, url_hash=None, words=None, links=None, videos=None, audio=None, files=None, tables=None, lists=None, blocks=None)
Bases:
objectA lossless snippet returned by NOSIBLE Search.
Attributes
contentimageslanguagenext_snippet_hashprev_snippet_hashsnippet_hashstatisticsurl_hashwordslinksvideosaudiofilestableslistsblocksMethods
to_dict()Convert the snippet to a lossless dictionary representation.
from_dict(data)Create a snippet without discarding unknown response fields.
Convert the snippet to JSON.
- Parameters:
content (str | None)
images (List[Any] | None)
language (str | None)
next_snippet_hash (str | None)
prev_snippet_hash (str | None)
snippet_hash (str | None)
statistics (Dict[str, Any] | None)
url_hash (str | None)
words (str | None)
links (List[Any] | None)
videos (List[Any] | None)
audio (List[Any] | None)
files (List[Any] | None)
tables (List[Any] | None)
lists (List[Any] | None)
blocks (List[Any] | None)
- unknown_fields: Dict[str, Any]
- present_fields: Set[str] | None = None
- classmethod from_dict(data)
Create a snippet without discarding unknown response fields.
- Parameters:
data (Dict[str, Any]) – Snippet payload.
- Returns:
Parsed snippet.
- Return type: