Appearance
视频号
init_video_account
视频号初始化。使用视频号相关接口前需先调用。
python
wechat.init_video_account(client_id, timeout=None)| 参数 | 类型 | 说明 |
|---|---|---|
| client_id | int | 客户端ID |
| timeout | int | 超时时间(秒) |
search_video_account
搜索视频号。
python
wechat.search_video_account(client_id, query, scene, last_buff="", timeout=None)| 参数 | 类型 | 说明 |
|---|---|---|
| client_id | int | 客户端ID |
| query | str | 搜索关键词 |
| scene | int | 搜索场景 |
| last_buff | str | 翻页参数 |
| timeout | int | 超时时间(秒) |
get_video_account_user_page
获取视频号用户主页。
python
wechat.get_video_account_user_page(client_id, username, last_buff="", timeout=None)| 参数 | 类型 | 说明 |
|---|---|---|
| client_id | int | 客户端ID |
| username | str | 用户名 |
| last_buff | str | 翻页参数 |
| timeout | int | 超时时间(秒) |
view_video_details
查看视频详细信息(含评论)。
python
wechat.view_video_details(client_id, object_id, object_nonce_id, last_buff="", timeout=None)| 参数 | 类型 | 说明 |
|---|---|---|
| client_id | int | 客户端ID |
| object_id | str | 视频对象ID |
| object_nonce_id | str | 视频Nonce ID |
| last_buff | str | 翻页参数 |
| timeout | int | 超时时间(秒) |
follow_video_blogger
关注视频号博主。
python
wechat.follow_video_blogger(client_id, username, timeout=None)| 参数 | 类型 | 说明 |
|---|---|---|
| client_id | int | 客户端ID |
| username | str | 博主用户名 |
| timeout | int | 超时时间(秒) |
like_video
视频号点赞。
python
wechat.like_video(client_id, object_id, object_nonce_id, timeout=None)| 参数 | 类型 | 说明 |
|---|---|---|
| client_id | int | 客户端ID |
| object_id | str | 视频对象ID |
| object_nonce_id | str | 视频Nonce ID |
| timeout | int | 超时时间(秒) |
get_message_session_id
获取私信 session ID。
python
wechat.get_message_session_id(client_id, to_username, role_type, timeout=None)| 参数 | 类型 | 说明 |
|---|---|---|
| client_id | int | 客户端ID |
| to_username | str | 目标用户名 |
| role_type | int | 角色类型 |
| timeout | int | 超时时间(秒) |
send_private_message
发送私信。
python
wechat.send_private_message(client_id, to_username, session_id, content, timeout=None)| 参数 | 类型 | 说明 |
|---|---|---|
| client_id | int | 客户端ID |
| to_username | str | 目标用户名 |
| session_id | str | 会话ID |
| content | str | 消息内容 |
| timeout | int | 超时时间(秒) |
create_virtual_nickname
创建虚拟昵称。
python
wechat.create_virtual_nickname(client_id, nickname, head_img_url, timeout=None)| 参数 | 类型 | 说明 |
|---|---|---|
| client_id | int | 客户端ID |
| nickname | str | 虚拟昵称 |
| head_img_url | str | 头像URL |
| timeout | int | 超时时间(秒) |
switch_virtual_nickname
切换虚拟昵称。
python
wechat.switch_virtual_nickname(client_id, role_type, timeout=None)| 参数 | 类型 | 说明 |
|---|---|---|
| client_id | int | 客户端ID |
| role_type | int | 角色类型 |
| timeout | int | 超时时间(秒) |
delete_virtual_nickname
删除虚拟昵称。
python
wechat.delete_virtual_nickname(client_id, timeout=None)| 参数 | 类型 | 说明 |
|---|---|---|
| client_id | int | 客户端ID |
| timeout | int | 超时时间(秒) |