返回类型结构说明
# TraceMoe
# TraceMoe主类说明
TraceMoe(
mute=False, # 预览视频是否静音(默认不静音)
size=None, # 预览 视频/图像 大小(可填:s/m/l)(小/中/大)
**requests_kwargs # 代理设置
)
1
2
3
4
5
2
3
4
5
获取个人信息(获取api请求限制信息) 附加功能
from PicImageSearch import TraceMoe,Network
from PicImageSearch.model import TraceMoeResponse
from loguru import logger
async with Network() as client:
tracemoe = TraceMoe(client=client)
resp = await tracemoe.me(key)
logger.info(resp.id)# IP 地址(访客)或电子邮件地址(用户)
logger.info(resp.priority) # 优先级
logger.info(resp.concurrency) # 搜索请求数量
logger.info(resp.quota) # 本月的搜索配额
logger.info(resp.quotaUsed)# 本月已经使用的搜索配额
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
笔记
在 me()
方法中添加 key
值以获取信息
❤️通过赞助 (opens new window) 获取 key
,提高限制
# 数据返回值列表
提示
数据结构也可以查阅源代码
- name: 源代码
desc: 🚀强的人直接看这个
link: https://github.com/kitUIN/PicImageSearch/blob/main/PicImageSearch/model/tracemoe.py
bgColor: '#DFEEE7'
textColor: '#2A3344'
1
2
3
4
5
2
3
4
5
情境
以Demo
中的代码为例子
变量 | 内容 | 类型 |
---|---|---|
resp.origin | 原始数据 | dict |
resp.count | 搜索结果数量 | int |
resp.frameCount | 搜索的帧总数 | int |
resp.error | 错误信息 | str |
resp.raw | 结果返回值(具体见下表) | list |
提示
resp.raw
存储了所有的返回结果
例如 resp.raw[0]
内存放了第一条搜索结果
以下列表以resp.raw[0]
为例
变量 | 内容 | 类型 |
---|---|---|
resp.raw[0].origin | 原始数据 | dict |
resp.raw[0].anilistID | 匹配的Anilist ID (opens new window) | int |
resp.raw[0].title | 番剧名字(包含国际,罗马音,英文) ( anilistInfo (opens new window) 设为 True (默认)时) | dict |
resp.raw[0].title_native | 番剧国际名字 ( anilistInfo (opens new window) 设为 True (默认)时) | str |
resp.raw[0].title_romaji | 番剧罗马音名字 ( anilistInfo (opens new window) 设为 True (默认)时) | str |
resp.raw[0].title_english | 番剧英文名字 ( anilistInfo (opens new window) 设为 True (默认)时) | str |
resp.raw[0].title_chinese | 番剧中文名字 ( anilistInfo (opens new window) 设为 True (默认)并且chineseTitle (opens new window) 设为 True (默认)时) | str |
resp.raw[0].idMal | 匹配的MyAnimelist ID (opens new window) ( anilistInfo (opens new window) 设为 True (默认)时) | int |
resp.raw[0].synonyms | 备用英文标题 ( anilistInfo (opens new window) 设为 True (默认)时) | list |
resp.raw[0].isAdult | 是否R18 ( anilistInfo (opens new window) 设为 True (默认)时) | bool |
resp.raw[0].From | 匹配场景的开始时间 | int |
resp.raw[0].To | 匹配场景的结束时间 | int |
resp.raw[0].filename | 找到匹配项的文件名 | str |
resp.raw[0].episode | 估计的匹配的番剧的集数 | int |
resp.raw[0].similarity | 相似度,相似性低于 87% 的搜索结果可能是不正确的结果 | float |
resp.raw[0].image | 预览图片地址 | str |
resp.raw[0].video | 预览视频地址 | str |
resp.raw[0].anime_info | 标题信息 | dict |
# 原始数据返回值 实例JSON
原始数据返回值 实例JSON
{
"frameCount": 12121350,
"error": "",
"result": [
{
"anilist": 11887,
"filename": "Kokoro Connect - 05 (BD 1280x720 x264 AACx2).mp4",
"episode": 5,
"from": 1169.17,
"to": 1174.92,
"similarity": 0.9758578643762691,
"video": "https://media.trace.moe/video/11887/Kokoro%20Connect%20-%2005%20(BD%201280x720%20x264%20AACx2).mp4?t\u003d1172.045\u0026token\u003dREUQ6vB5db3YYcJNvDnxrb4QoA",
"image": "https://media.trace.moe/image/11887/Kokoro%20Connect%20-%2005%20(BD%201280x720%20x264%20AACx2).mp4?t\u003d1172.045\u0026token\u003dREUQ6vB5db3YYcJNvDnxrb4QoA"
},
{
"anilist": 21703,
"filename": "[Ohys-Raws] Fune o Amu - 05 (CX 1280x720 x264 AAC).mp4",
"episode": 5,
"from": 487.67,
"to": 487.83,
"similarity": 0.8391268802872566,
"video": "https://media.trace.moe/video/21703/%5BOhys-Raws%5D%20Fune%20o%20Amu%20-%2005%20(CX%201280x720%20x264%20AAC).mp4?t\u003d487.75\u0026token\u003diVSsWaEVAcocKi0cMSVATTGf1O4",
"image": "https://media.trace.moe/image/21703/%5BOhys-Raws%5D%20Fune%20o%20Amu%20-%2005%20(CX%201280x720%20x264%20AAC).mp4?t\u003d487.75\u0026token\u003diVSsWaEVAcocKi0cMSVATTGf1O4"
},
{
"anilist": 21703,
"filename": "[Leopard-Raws] Fune o Amu - 05 RAW (THK 1280x720 x264 AAC).mp4",
"episode": 5,
"from": 487.5,
"to": 487.58,
"similarity": 0.8371642646044424,
"video": "https://media.trace.moe/video/21703/%5BLeopard-Raws%5D%20Fune%20o%20Amu%20-%2005%20RAW%20(THK%201280x720%20x264%20AAC).mp4?t\u003d487.53999999999996\u0026token\u003dciaYOUG0PBBcITNc2aV3LEbloo",
"image": "https://media.trace.moe/image/21703/%5BLeopard-Raws%5D%20Fune%20o%20Amu%20-%2005%20RAW%20(THK%201280x720%20x264%20AAC).mp4?t\u003d487.53999999999996\u0026token\u003dciaYOUG0PBBcITNc2aV3LEbloo"
},
{
"anilist": 21,
"filename": "[OPFansMaplesnow][One_Piece][780][MP4].mp4",
"episode": 780,
"from": 716.08,
"to": 716.75,
"similarity": 0.8362752569452551,
"video": "https://media.trace.moe/video/21/%5BOPFansMaplesnow%5D%5BOne_Piece%5D%5B780%5D%5BMP4%5D.mp4?t\u003d716.415\u0026token\u003dgib00MBIYdKYrmdfNV1KgDJp1s",
"image": "https://media.trace.moe/image/21/%5BOPFansMaplesnow%5D%5BOne_Piece%5D%5B780%5D%5BMP4%5D.mp4?t\u003d716.415\u0026token\u003dgib00MBIYdKYrmdfNV1KgDJp1s"
},
{
"anilist": 21,
"filename": "[Skytree][海贼王][One_Piece][780][GB_JP][X264_AAC][720P][CRRIP][天空树双语字幕组].mp4",
"episode": 780,
"from": 714.33,
"to": 716.67,
"similarity": 0.8351087470692394,
"video": "https://media.trace.moe/video/21/%5BSkytree%5D%5B%E6%B5%B7%E8%B4%BC%E7%8E%8B%5D%5BOne_Piece%5D%5B780%5D%5BGB_JP%5D%5BX264_AAC%5D%5B720P%5D%5BCRRIP%5D%5B%E5%A4%A9%E7%A9%BA%E6%A0%91%E5%8F%8C%E8%AF%AD%E5%AD%97%E5%B9%95%E7%BB%84%5D.mp4?t\u003d715.5\u0026token\u003dL4G5sTqRwlgw9DK2lYNcpZhBIY",
"image": "https://media.trace.moe/image/21/%5BSkytree%5D%5B%E6%B5%B7%E8%B4%BC%E7%8E%8B%5D%5BOne_Piece%5D%5B780%5D%5BGB_JP%5D%5BX264_AAC%5D%5B720P%5D%5BCRRIP%5D%5B%E5%A4%A9%E7%A9%BA%E6%A0%91%E5%8F%8C%E8%AF%AD%E5%AD%97%E5%B9%95%E7%BB%84%5D.mp4?t\u003d715.5\u0026token\u003dL4G5sTqRwlgw9DK2lYNcpZhBIY"
},
{
"anilist": 4562,
"filename": "痴漢十人隊 THE ANIMATION 1 〜獲物たちの黄昏〜.mp4",
"episode": 1,
"from": 4.5,
"to": 4.5,
"similarity": 0.8348533618245904,
"video": "https://media.trace.moe/video/4562/%E7%97%B4%E6%BC%A2%E5%8D%81%E4%BA%BA%E9%9A%8A%20THE%20ANIMATION%201%20%E3%80%9C%E7%8D%B2%E7%89%A9%E3%81%9F%E3%81%A1%E3%81%AE%E9%BB%84%E6%98%8F%E3%80%9C.mp4?t\u003d4.5\u0026token\u003d8vcR8HnDaLOzAanzNBoTDO1CPzo",
"image": "https://media.trace.moe/image/4562/%E7%97%B4%E6%BC%A2%E5%8D%81%E4%BA%BA%E9%9A%8A%20THE%20ANIMATION%201%20%E3%80%9C%E7%8D%B2%E7%89%A9%E3%81%9F%E3%81%A1%E3%81%AE%E9%BB%84%E6%98%8F%E3%80%9C.mp4?t\u003d4.5\u0026token\u003d8vcR8HnDaLOzAanzNBoTDO1CPzo"
},
{
"anilist": 97821,
"filename": "Alice to Zouroku - 03 (BD 1280x720 x264 AACx2).mp4",
"episode": 3,
"from": 663.17,
"to": 663.25,
"similarity": 0.8305322939690996,
"video": "https://media.trace.moe/video/97821/Alice%20to%20Zouroku%20-%2003%20(BD%201280x720%20x264%20AACx2).mp4?t\u003d663.21\u0026token\u003doK2KAIG2vh7tAeQrqur4Kpjvc",
"image": "https://media.trace.moe/image/97821/Alice%20to%20Zouroku%20-%2003%20(BD%201280x720%20x264%20AACx2).mp4?t\u003d663.21\u0026token\u003doK2KAIG2vh7tAeQrqur4Kpjvc"
},
{
"anilist": 97821,
"filename": "[Leopard-Raws] Alice to Zouroku - 03 RAW (SUN 1280x720 x264 AAC).mp4",
"episode": 3,
"from": 671.67,
"to": 671.75,
"similarity": 0.8305036829174742,
"video": "https://media.trace.moe/video/97821/%5BLeopard-Raws%5D%20Alice%20to%20Zouroku%20-%2003%20RAW%20(SUN%201280x720%20x264%20AAC).mp4?t\u003d671.71\u0026token\u003dRvUQZEeEU5v1zwaetTjkJfkwL4",
"image": "https://media.trace.moe/image/97821/%5BLeopard-Raws%5D%20Alice%20to%20Zouroku%20-%2003%20RAW%20(SUN%201280x720%20x264%20AAC).mp4?t\u003d671.71\u0026token\u003dRvUQZEeEU5v1zwaetTjkJfkwL4"
},
{
"anilist": 21,
"filename": "[Leopard-Raws] One Piece - 780 RAW (CX 1280x720 x264 AAC).mp4",
"episode": 780,
"from": 725.33,
"to": 726.58,
"similarity": 0.8289718918856834,
"video": "https://media.trace.moe/video/21/%5BLeopard-Raws%5D%20One%20Piece%20-%20780%20RAW%20(CX%201280x720%20x264%20AAC).mp4?t\u003d725.955\u0026token\u003dbb0AjLcQrE3AuAu7wzvRWKyR6g",
"image": "https://media.trace.moe/image/21/%5BLeopard-Raws%5D%20One%20Piece%20-%20780%20RAW%20(CX%201280x720%20x264%20AAC).mp4?t\u003d725.955\u0026token\u003dbb0AjLcQrE3AuAu7wzvRWKyR6g"
},
{
"anilist": 12431,
"filename": "[EMD][Uchuu Kyoudai][16][BIG5][X264_AAC][1280X720][9022A07D].mp4",
"episode": 16,
"from": 1259.67,
"to": 1260.92,
"similarity": 0.8265738245233267,
"video": "https://media.trace.moe/video/12431/%5BEMD%5D%5BUchuu%20Kyoudai%5D%5B16%5D%5BBIG5%5D%5BX264_AAC%5D%5B1280X720%5D%5B9022A07D%5D.mp4?t\u003d1260.295\u0026token\u003dU5znosmmSIODGTYmdsyIlgqqYY",
"image": "https://media.trace.moe/image/12431/%5BEMD%5D%5BUchuu%20Kyoudai%5D%5B16%5D%5BBIG5%5D%5BX264_AAC%5D%5B1280X720%5D%5B9022A07D%5D.mp4?t\u003d1260.295\u0026token\u003dU5znosmmSIODGTYmdsyIlgqqYY"
}
]
}
1
2
3
4
5
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
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
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
2
3
4
5
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
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
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
上次更新: 2022/03/27, 20:47:51