TraceMoe
Classes
TraceMoeItem
Bases: BaseSearchItem
Represents a single search result from the TraceMoe API.
This class contains detailed information about a matched anime scene, including metadata about the anime and specific timing information for the matched scene.
Attributes:
Name | Type | Description |
---|---|---|
origin |
dict
|
Raw response data from the API. |
anime_info |
dict
|
Comprehensive anime metadata. |
idMal |
int
|
MyAnimeList database ID. |
title |
dict
|
Dictionary containing titles in various languages. |
title_native |
str
|
Title in the original language. |
title_english |
str
|
English title. |
title_romaji |
str
|
Romanized title. |
title_chinese |
str
|
Chinese title. |
anilist |
int
|
AniList database ID. |
synonyms |
list[str]
|
Alternative titles. |
isAdult |
bool
|
Whether the content is adult-oriented. |
type |
str
|
Media type classification. |
format |
str
|
Content format (TV, Movie, OVA, etc.). |
start_date |
dict
|
Anime start date information. |
end_date |
dict
|
Anime end date information. |
cover_image |
str
|
URL to the anime cover image. |
filename |
str
|
Name of the file containing the matched scene. |
episode |
int
|
Episode number of the match. |
From |
float
|
Start timestamp of the matched scene. |
To |
float
|
End timestamp of the matched scene. |
similarity |
float
|
Match confidence percentage (0-100). |
video |
str
|
URL to the preview video of the matched scene. |
image |
str
|
URL to the preview image of the matched scene. |
Source code in PicImageSearch/model/tracemoe.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 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 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
|
Functions
__init__(data, mute=False, size=None)
Initializes a TraceMoeItem with data from a search result.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data
|
dict[str, Any]
|
A dictionary containing parsed response data for an individual result. |
required |
mute
|
bool
|
Indicates whether to mute the video excerpt. |
False
|
size
|
Optional[str]
|
Size parameter for modifying video and image URLs. |
None
|
Source code in PicImageSearch/model/tracemoe.py
65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
|
TraceMoeMe
Represents user account information from the TraceMoe API.
This class encapsulates user-specific data including quotas, priorities, and usage statistics returned by the TraceMoe API.
Attributes:
Name | Type | Description |
---|---|---|
id |
str
|
User identifier (IP address for visitors or email for registered users). |
priority |
int
|
User's priority level for request processing. |
concurrency |
int
|
Maximum number of concurrent search requests allowed. |
quota |
int
|
Total search quota allocated for the current month. |
quotaUsed |
int
|
Number of searches consumed in the current month. |
Source code in PicImageSearch/model/tracemoe.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
|
Attributes
concurrency: int = data['concurrency']
instance-attribute
id: str = data['id']
instance-attribute
priority: int = data['priority']
instance-attribute
quota: int = data['quota']
instance-attribute
quotaUsed: int = data['quotaUsed']
instance-attribute
Functions
__init__(data)
Initializes a TraceMoeMe with user-related data from TraceMoe response.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data
|
dict[str, Any]
|
A dictionary containing user-related data from TraceMoe. |
required |
Source code in PicImageSearch/model/tracemoe.py
20 21 22 23 24 25 26 27 28 29 30 |
|
TraceMoeResponse
Bases: BaseSearchResponse[TraceMoeItem]
Represents the complete response from a TraceMoe search operation.
Encapsulates the entire search response including all matched scenes and metadata about the search operation itself.
Attributes:
Name | Type | Description |
---|---|---|
origin |
dict
|
Raw API response data. |
raw |
list[TraceMoeItem]
|
List of processed search results. |
frameCount |
int
|
Total number of frames analyzed during search. |
error |
str
|
Error message if the search encountered issues. |
url |
str
|
URL to the search results page. |
Source code in PicImageSearch/model/tracemoe.py
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 |
|
Functions
__init__(resp_data, resp_url, mute, size)
Initializes with the response data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
resp_data
|
dict[str, Any]
|
A dictionary containing parsed response data from TraceMoe. |
required |
resp_url
|
str
|
URL to the search result page. |
required |
mute
|
bool
|
Flag for muting video excerpts in search results. |
required |
size
|
Optional[str]
|
Size parameter for modifying video and image URLs. |
required |
Source code in PicImageSearch/model/tracemoe.py
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 |
|