Merge branch 'master' of https://gitee.com/TeaCodeNice/crawler-plugin
modified: amazon/detail_spider.py modified: amazon/main.py
This commit is contained in:
@@ -111,8 +111,29 @@ class ChromeAmzone(ChromeAmzoneBase):
|
||||
|
||||
|
||||
|
||||
<<<<<<< HEAD
|
||||
class SpiderTask(TaskBase):
|
||||
task_name = "亚马逊采集"
|
||||
=======
|
||||
class SpiderTask:
|
||||
mark_name = "亚马逊采集"
|
||||
|
||||
def __init__(self, user_info: dict = None):
|
||||
"""初始化审批任务处理器
|
||||
|
||||
Args:
|
||||
user_info: 用户信息字典,包含 company, username, password
|
||||
"""
|
||||
self.user_info = user_info or {}
|
||||
self.running = True
|
||||
self.result_api_module = "appearance-patent"
|
||||
|
||||
def log(self, message: str, level: str = "INFO"):
|
||||
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
||||
if level == "ERROR":
|
||||
show_notification(message, "error")
|
||||
print(f"[{timestamp}] [PriceTask] [{level}] {message}")
|
||||
>>>>>>> 6d398b66bc24634b13f1de162e8f68836e64441d
|
||||
|
||||
@staticmethod
|
||||
def group_by_id_prefix(data):
|
||||
@@ -166,9 +187,16 @@ class SpiderTask(TaskBase):
|
||||
task_data: 任务数据
|
||||
"""
|
||||
try:
|
||||
<<<<<<< HEAD
|
||||
data = task_data.get("data", {})
|
||||
task_id = data.get("taskId")
|
||||
groups = self.normalize_groups(data)
|
||||
=======
|
||||
data = task_data.get("data", {})
|
||||
self.result_api_module = "similar-asin" if task_data.get("type") == "similar-asin-run" else "appearance-patent"
|
||||
task_id = data.get("taskId")
|
||||
groups = self.normalize_groups(data)
|
||||
>>>>>>> 6d398b66bc24634b13f1de162e8f68836e64441d
|
||||
|
||||
# 用于测试
|
||||
limit = data.get("limit", None)
|
||||
@@ -307,7 +335,7 @@ class SpiderTask(TaskBase):
|
||||
"""回传处理结果到API
|
||||
"""
|
||||
|
||||
url = f"{DELETE_BRAND_API_BASE}/api/appearance-patent/tasks/{task_id}/result"
|
||||
url = f"{DELETE_BRAND_API_BASE}/api/{self.result_api_module}/tasks/{task_id}/result"
|
||||
|
||||
payload ={
|
||||
"submissionId": f"{task_id}",
|
||||
|
||||
@@ -62,10 +62,11 @@ class TaskMonitor:
|
||||
"product-risk-resolve-run" : "产品风险审批",
|
||||
"shop-match-run" : "匹配价格",
|
||||
"price-track-run" : "跟价",
|
||||
"query-asin-run" : "状态查询",
|
||||
"patrol-delete-run" : "巡店删除",
|
||||
"appearance-patent-run" : "亚马逊采集",
|
||||
}
|
||||
"query-asin-run" : "状态查询",
|
||||
"patrol-delete-run" : "巡店删除",
|
||||
"appearance-patent-run" : "亚马逊采集",
|
||||
"similar-asin-run" : "亚马逊采集",
|
||||
}
|
||||
try:
|
||||
while self.running:
|
||||
try:
|
||||
|
||||
1
app/assets/appearance-patent-CYKeZX2a.css
Normal file
1
app/assets/appearance-patent-CYKeZX2a.css
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{aZ as r}from"./pywebview-BWNiqXug.js";const n="";function a(e){return r(`${n}/api/brand/expand-folder-recursive`,{folder:e})}export{a as e};
|
||||
import{a_ as r}from"./pywebview-Cz_PRNOK.js";const n="";function a(e){return r(`${n}/api/brand/expand-folder-recursive`,{folder:e})}export{a as e};
|
||||
1
app/assets/brand-CyNKOr-G.js
Normal file
1
app/assets/brand-CyNKOr-G.js
Normal file
@@ -0,0 +1 @@
|
||||
import{b6 as r}from"./pywebview-BcagetkZ.js";const n="";function s(e){return r(`${n}/api/brand/expand-folder-recursive`,{folder:e})}export{s as e};
|
||||
1
app/assets/convert-BKSNvX8i.css
Normal file
1
app/assets/convert-BKSNvX8i.css
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
app/assets/dedupe-DNlVfFj-.css
Normal file
1
app/assets/dedupe-DNlVfFj-.css
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
app/assets/delete-brand-BJod9K65.css
Normal file
1
app/assets/delete-brand-BJod9K65.css
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
app/assets/patrol-delete-CBBdonF4.css
Normal file
1
app/assets/patrol-delete-CBBdonF4.css
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
app/assets/product-risk-DV5AzjVc.css
Normal file
1
app/assets/product-risk-DV5AzjVc.css
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
55
app/assets/pywebview-BcagetkZ.js
Normal file
55
app/assets/pywebview-BcagetkZ.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
app/assets/pywebview-Dp5dN8OO.css
Normal file
1
app/assets/pywebview-Dp5dN8OO.css
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
app/assets/similar-asin-B-_UTsa7.css
Normal file
1
app/assets/similar-asin-B-_UTsa7.css
Normal file
File diff suppressed because one or more lines are too long
6
app/assets/similar-asin.js
Normal file
6
app/assets/similar-asin.js
Normal file
File diff suppressed because one or more lines are too long
1
app/assets/split-BoBVrLdC.css
Normal file
1
app/assets/split-BoBVrLdC.css
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,16 +1,16 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>格式转换 - 数富AI</title>
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>格式转换 - 数富AI</title>
|
||||
<script type="module" crossorigin src="/assets/convert.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="/assets/pywebview-BWNiqXug.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/brand-CABpTGPu.js">
|
||||
<link rel="stylesheet" crossorigin href="/assets/pywebview-BFZO8_3q.css">
|
||||
<link rel="stylesheet" crossorigin href="/assets/convert-r7MSXq7I.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
</body>
|
||||
<link rel="modulepreload" crossorigin href="/assets/pywebview-Cz_PRNOK.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/brand-Cs6TxmtW.js">
|
||||
<link rel="stylesheet" crossorigin href="/assets/pywebview-Dp5dN8OO.css">
|
||||
<link rel="stylesheet" crossorigin href="/assets/convert-BKSNvX8i.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>数据去重 - 数富AI</title>
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>数据去重 - 数富AI</title>
|
||||
<script type="module" crossorigin src="/assets/dedupe.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="/assets/pywebview-BWNiqXug.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/brand-CABpTGPu.js">
|
||||
<link rel="stylesheet" crossorigin href="/assets/pywebview-BFZO8_3q.css">
|
||||
<link rel="stylesheet" crossorigin href="/assets/dedupe-DMeaPUMZ.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
</body>
|
||||
<link rel="modulepreload" crossorigin href="/assets/pywebview-Cz_PRNOK.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/brand-Cs6TxmtW.js">
|
||||
<link rel="stylesheet" crossorigin href="/assets/pywebview-Dp5dN8OO.css">
|
||||
<link rel="stylesheet" crossorigin href="/assets/dedupe-DNlVfFj-.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>删除品牌 - 数富AI</title>
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>删除品牌 - 数富AI</title>
|
||||
<script type="module" crossorigin src="/assets/delete-brand.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="/assets/pywebview-BWNiqXug.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/brand-CABpTGPu.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/pywebview-Cz_PRNOK.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/brand-Cs6TxmtW.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/categorized-timers-JPA-olTr.js">
|
||||
<link rel="stylesheet" crossorigin href="/assets/pywebview-BFZO8_3q.css">
|
||||
<link rel="stylesheet" crossorigin href="/assets/delete-brand-B5ChOXZY.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
</body>
|
||||
<link rel="stylesheet" crossorigin href="/assets/pywebview-Dp5dN8OO.css">
|
||||
<link rel="stylesheet" crossorigin href="/assets/delete-brand-BJod9K65.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>数据拆分 - 数富AI</title>
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>数据拆分 - 数富AI</title>
|
||||
<script type="module" crossorigin src="/assets/split.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="/assets/pywebview-BWNiqXug.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/brand-CABpTGPu.js">
|
||||
<link rel="stylesheet" crossorigin href="/assets/pywebview-BFZO8_3q.css">
|
||||
<link rel="stylesheet" crossorigin href="/assets/split-Cw6sXhAg.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
</body>
|
||||
<link rel="modulepreload" crossorigin href="/assets/pywebview-Cz_PRNOK.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/brand-Cs6TxmtW.js">
|
||||
<link rel="stylesheet" crossorigin href="/assets/pywebview-Dp5dN8OO.css">
|
||||
<link rel="stylesheet" crossorigin href="/assets/split-BoBVrLdC.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user