本技能用于自动访问精选联盟达人广场,根据用户提供的动态筛选条件查找符合条件的达人,并将结果保存为 Excel 文件到桌面。
新增功能(v1.1.0):
当用户需要:
打开 Chrome 浏览器(使用默认用户配置文件)访问达人广场页面
检测登录状态:
https://buyin.jinritemai.com/mpa/account/institution-role-select根据用户提供的条件依次点击筛选条件
捕获最后一次接口请求返回的数据(接口: https://buyin.jinritemai.com/api/authorStatData/seekAuthor)
将满足条件的达人信息保存为 Excel 文件到桌面
支持的筛选条件包括:
调用 scripts/daren_search.py 脚本执行任务,传入用户要求的筛选条件参数和可选的登录凭据。
python
{
'category': '服饰内衣',
'live_viewers': [100, 1000],
'followers': [100000, 1000000],
'level': 'LV2',
'gender': '女',
'email': 'user@example.com', # 可选:登录邮箱
'password': 'your_password' # 可选:登录密码
}
参数必填类型说明category否string主推类目live_viewers否list直播观看人数范围 [最小值,最大值]followers否list粉丝量范围 [最小值,最大值]level否string达人等级 (LV1-LV5)gender否string达人性别 (男/女)email否string登录邮箱(未登录时需要)password否string登录密码(未登录时需要)
当脚本检测到以下情况时,会自动触发登录流程:
login、 sso 或 institution-role-select访问角色选择页面: https://buyin.jinritemai.com/mpa/account/institution-role-select
选择招商团长身份:点击"招商团长"选项
输入登录凭据:
email 和 password:自动填写并提交等待登录完成:检测页面跳转到达人广场或首页
继续执行筛选任务
若检测到未登录且用户未提供邮箱密码,脚本将输出:
text
⚠ 检测到未登录状态,但用户未提供登录凭据
请选择以下方式之一:
1. 在浏览器中手动完成登录,然后重新运行脚本
2. 提供邮箱和密码参数后重新运行:
{
"email": "your_email@example.com",
"password": "your_password"
}
等待用户手动登录...(最长等待 180 秒)
错误场景处理方式未提供登录凭据且未登录输出提示信息,等待用户手动登录或终止任务登录失败重试最多 3 次,失败后终止并报告错误网络超时自动重试,最多 5 次页面元素未找到记录警告,继续尝试其他选择器
scripts/daren_search.py - 主执行脚本(包含自动登录逻辑)references/api_details.md - 接口详细说明references/login_flow.md - 登录流程详细说明(新增)python
filters = {
'category': '服饰内衣',
'live_viewers': [100, 1000],
'followers': [100000, 1000000],
'level': 'LV2',
'gender': '女'
}
python
filters = {
'category': '美妆护肤',
'followers': [500000, 2000000],
'level': 'LV3',
'email': 'merchant@example.com',
'password': 'secure_password_123'
}
python
filters = {
'category': '食品生鲜',
'level': 'LV1'
}
# 脚本将提示用户手动登录或提供凭据