Yandex
Classes
YandexItem
Bases: BaseSearchItem
Represents a single Yandex search result item.
A structured representation of an individual image search result from Yandex, containing detailed information about the found image and its source.
Attributes:
Name | Type | Description |
---|---|---|
url |
str
|
Direct URL to the webpage containing the image. |
title |
str
|
Title or heading associated with the image. |
thumbnail |
str
|
URL of the image thumbnail, properly formatted with https if needed. |
source |
str
|
Domain name of the website hosting the image. |
content |
str
|
Descriptive text or context surrounding the image. |
size |
str
|
Image dimensions in "widthxheight" format. |
Source code in PicImageSearch/model/yandex.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
|
Functions
__init__(data, **kwargs)
Initializes a YandexItem with data from a search result.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data
|
dict[str, Any]
|
A dictionary containing the search result data. |
required |
Source code in PicImageSearch/model/yandex.py
25 26 27 28 29 30 31 |
|
YandexResponse
Bases: BaseSearchResponse[YandexItem]
Encapsulates a complete Yandex reverse image search response.
Processes and stores the full response from a Yandex reverse image search, including all found image results and metadata.
Attributes:
Name | Type | Description |
---|---|---|
raw |
list[YandexItem]
|
List of parsed search results as YandexItem instances. |
url |
str
|
URL of the search results page. |
origin |
PyQuery
|
PyQuery object containing the raw HTML response. |
Source code in PicImageSearch/model/yandex.py
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
|
Functions
__init__(resp_data, resp_url, **kwargs)
Initializes with the response text and URL.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
resp_data
|
str
|
the text of the response. |
required |
resp_url
|
str
|
URL to the search result page. |
required |
Source code in PicImageSearch/model/yandex.py
71 72 73 74 75 76 77 78 |
|