This commit is contained in:
zhu
2026-05-06 14:04:05 +08:00
parent d78d70bde0
commit 40df507300
17 changed files with 691 additions and 163 deletions

View File

@@ -10,7 +10,7 @@ export const PLATFORM_CONFIGS: PlatformConfig[] = [
name: '数据看板',
uniqueKey: 'databoard',
url: 'https://seller.shopee.com.my/',
checkSelector: '.rate-manager-content',
checkSelector: '.page-container',
fields: [
{
label: "出货统计",
@@ -119,6 +119,191 @@ export const PLATFORM_CONFIGS: PlatformConfig[] = [
},
],
},
{
name: "广告中心",
uniqueKey: "adscenter",
url: "https://seller.shopee.com.my/portal/marketing/pas/index",
checkSelector: '.page-container',
fields: [
{
label: "我的账户",
className: ".my-account-wrap",
keys: [
{
label: "广告余额",
className: ".credit-expense-label-wrapper:nth-child(1) .ellipsis-content"
},
{
label: "今日广告花费",
className: ".credit-expense-label-wrapper:nth-child(2) .ellipsis-content"
},
]
},
{
label: "进行中广告列表",
className: ".eds-table__body-container",
type: 2,
tableParts: [
{ name: "fixed", select: ".eds-table__fix-body" },
{ name: "main", select: ".eds-table__main-body" }
],
keys: [
{
label: "广告信息",
className: ".info-containter",
part: "fixed",
keys: [
{
label: "广告名称",
className: ".campaign-name-container"
},
{
label: "广告类型",
className: ".gmv-max-noti"
},
{
label: "结束时间",
className: ".time-edit-wrapper"
}
]
},
{
label: "每日预算",
part: "main",
className: "td:nth-child(1)"
},
{
label: "目标ROAS",
part: "main",
className: "td:nth-child(2)"
},
{
label: "花费",
part: "main",
className: "td:nth-child(4)"
},
{
label: "销售额",
part: "main",
className: "td:nth-child(5)"
},
{
label: "广告支出回报率",
part: "main",
className: "td:nth-child(6)"
}
],
pagination: {
nextBtn: ".eds-pager__button-next", // 下一页按钮
disabledClass: ".eds-button--disabled", // 按钮禁用时的class用来判断结束
maxPage: 1, // 最大爬取页数
delay: 2000 // 翻页后的等待加载时间
},
}
]
},
{
name: "评论管理",
uniqueKey: "message",
url: "https://seller.shopee.com.my/portal/settings/shop/rating",
checkSelector: '.page-container',
fields: [
{
label: "低星评论",
className: ".border-solid.rounded",
condition: {
list: [
".flex.items-center.mt-6 div:nth-child(3)",
".eds-react-checkbox-group label:nth-child(2)",
".eds-react-checkbox-group label:nth-child(3)",
".eds-react-checkbox-group label:nth-child(4)"
],
time: 200,
},
type: 1,
keys: [
{
label: "用户",
className: ".flex.items-center.justify-start .ml-2"
},
{
label: "订单编号",
className: ".underline.px-1"
},
{
label: "商品名称",
className: ".min-w-0.font-medium.break-all"
},
{
label: "规格",
className: ".min-w-0.font-medium.break-all + div"
},
{
label: "评价内容",
className: ".min-w-0.overflow-hidden",
condition: {
list: [
"span.cursor-pointer"
],
time: 200,
},
},
],
pagination: {
nextBtn: ".eds-react-pagination-pager__button-next",
maxPage: 2, // 最大爬取页数
delay: 2000 // 翻页后的等待加载时间
},
},
]
},
{
name: "账户健康状态",
uniqueKey: "accounthealth",
url: "https://seller.shopee.com.my/portal/accounthealth/home",
checkSelector: '.page-container',
fields: [
{
label: "健康状态",
className: ".metric-content",
type: 1,
keys: [
{
label: "模块名",
className: ".metric-type"
},
{
label: "值",
className: ".metric-item",
type: 1,
keys: [
{
label: "指标",
className: "p.metric-text"
},
{
label: "值",
className: ".metric-my"
},
{
label: "目标",
className: ".metric-target"
},
{
label: "使用类型",
className: ".metric-applied-to"
},
]
},
],
},
]
}
],
},
]