Compare commits

...

2 Commits

Author SHA1 Message Date
q792602257 d1679cdfff common更新 2026-07-08 22:27:10 +08:00
q792602257 0bac10c016 支持商品其他店铺信息 2026-07-08 21:55:29 +08:00
3 changed files with 19 additions and 18 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ authors = [
] ]
dependencies = [ dependencies = [
# playwright / playwright-stealth 由 surugaya-common 的 [browser] extra 提供,不再直接声明。 # playwright / playwright-stealth 由 surugaya-common 的 [browser] extra 提供,不再直接声明。
"surugaya-common[browser]>=0.3.0", "surugaya-common[browser]>=0.4.0",
"pydantic>=2.7.0", "pydantic>=2.7.0",
"pydantic-settings>=2.2.0", "pydantic-settings>=2.2.0",
"loguru>=0.7.2", "loguru>=0.7.2",
+2 -1
View File
@@ -88,6 +88,7 @@ class SurugayaPurchaseTask(BasePurchaseTask):
product_id = item.get("id") product_id = item.get("id")
sku_id = item.get("sku_id") sku_id = item.get("sku_id")
tenpo_cd = item.get("tenpo_cd") tenpo_cd = item.get("tenpo_cd")
branch_number = item.get("branch_number")
price_limit = int(item.get("price_limit") or 0) price_limit = int(item.get("price_limit") or 0)
if not product_id: if not product_id:
logger.warning(f"[任务 {self.task_id}] 索引 {index} 的商品未提供 id,跳过。") logger.warning(f"[任务 {self.task_id}] 索引 {index} 的商品未提供 id,跳过。")
@@ -98,7 +99,7 @@ class SurugayaPurchaseTask(BasePurchaseTask):
logger.warning(f"[任务 {self.task_id}] 索引 {index} 的商品数量为 0,跳过。") logger.warning(f"[任务 {self.task_id}] 索引 {index} 的商品数量为 0,跳过。")
continue continue
detail_url = product_detail_url(product_id, tenpo_cd) detail_url = product_detail_url(product_id, tenpo_cd, branch_number)
logger.debug( logger.debug(
f"[任务 {self.task_id}] 进入商品 {product_id} 详情页,购买数量: {number}, URL: {detail_url}") f"[任务 {self.task_id}] 进入商品 {product_id} 详情页,购买数量: {number}, URL: {detail_url}")
Generated
+16 -16
View File
@@ -409,7 +409,7 @@ requires-dist = [
{ name = "pyscreeze", specifier = ">=1.0.1" }, { name = "pyscreeze", specifier = ">=1.0.1" },
{ name = "pyyaml", specifier = ">=6.0.1" }, { name = "pyyaml", specifier = ">=6.0.1" },
{ name = "redis", specifier = "==8.0.0" }, { name = "redis", specifier = "==8.0.0" },
{ name = "surugaya-common", extras = ["browser"], specifier = ">=0.3.0", index = "https://git.jerryyan.net/api/packages/jp/pypi/simple" }, { name = "surugaya-common", extras = ["browser"], specifier = ">=0.4.0", index = "https://git.jerryyan.net/api/packages/jp/pypi/simple" },
] ]
[[package]] [[package]]
@@ -702,6 +702,18 @@ wheels = [
{ url = "https://mirrors.huaweicloud.com/repository/pypi/packages/80/c8/210f282d278e4709cdd71b12a31af45a30a22ab3207b387e29b37e478713/playwright-1.60.0-py3-none-win_arm64.whl", hash = "sha256:6e4f6700a4c2250efff8e690a81d66e3855754fb587b6b87cf5c784014f91537" }, { url = "https://mirrors.huaweicloud.com/repository/pypi/packages/80/c8/210f282d278e4709cdd71b12a31af45a30a22ab3207b387e29b37e478713/playwright-1.60.0-py3-none-win_arm64.whl", hash = "sha256:6e4f6700a4c2250efff8e690a81d66e3855754fb587b6b87cf5c784014f91537" },
] ]
[[package]]
name = "playwright-stealth"
version = "2.0.3"
source = { registry = "https://mirrors.huaweicloud.com/repository/pypi/simple" }
dependencies = [
{ name = "playwright" },
]
sdist = { url = "https://mirrors.huaweicloud.com/repository/pypi/packages/a4/db/6ade5d539c7d151b9defc78fafa8b65aa52352617d0e7699b47008bd801f/playwright_stealth-2.0.3.tar.gz", hash = "sha256:1d8e488fbdd8f190f1269ea8cf5d57d14df3a9f1af1001c41ee3588b2aac3133" }
wheels = [
{ url = "https://mirrors.huaweicloud.com/repository/pypi/packages/b5/10/607c409712c02a26c4cb794820514cb7fdaaeac15fb05bed917fb8a354b3/playwright_stealth-2.0.3-py3-none-any.whl", hash = "sha256:1887ade423ab7ff8ae16d363a30a38de0b5817e1e4a29d47b74bf3a0e3dbfcb4" },
]
[[package]] [[package]]
name = "propcache" name = "propcache"
version = "0.5.2" version = "0.5.2"
@@ -796,18 +808,6 @@ wheels = [
{ url = "https://mirrors.huaweicloud.com/repository/pypi/packages/3a/ed/1cdcab6ba3d6ab7feca11fc14f0eeea80755bb53ef4e892079f31b10a25f/propcache-0.5.2-py3-none-any.whl", hash = "sha256:be1ddfcbb376e3de5d2e2db1d58d6d67463e6b4f9f040c000de8e300295465fe" }, { url = "https://mirrors.huaweicloud.com/repository/pypi/packages/3a/ed/1cdcab6ba3d6ab7feca11fc14f0eeea80755bb53ef4e892079f31b10a25f/propcache-0.5.2-py3-none-any.whl", hash = "sha256:be1ddfcbb376e3de5d2e2db1d58d6d67463e6b4f9f040c000de8e300295465fe" },
] ]
[[package]]
name = "playwright-stealth"
version = "2.0.3"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "playwright" },
]
sdist = { url = "https://files.pythonhosted.org/packages/a4/db/6ade5d539c7d151b9defc78fafa8b65aa52352617d0e7699b47008bd801f/playwright_stealth-2.0.3.tar.gz", hash = "sha256:1d8e488fbdd8f190f1269ea8cf5d57d14df3a9f1af1001c41ee3588b2aac3133", size = 25751, upload-time = "2026-04-04T02:50:33.88Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/b5/10/607c409712c02a26c4cb794820514cb7fdaaeac15fb05bed917fb8a354b3/playwright_stealth-2.0.3-py3-none-any.whl", hash = "sha256:1887ade423ab7ff8ae16d363a30a38de0b5817e1e4a29d47b74bf3a0e3dbfcb4", size = 34385, upload-time = "2026-04-04T02:50:35.246Z" },
]
[[package]] [[package]]
name = "pyautogui" name = "pyautogui"
version = "0.9.54" version = "0.9.54"
@@ -1112,15 +1112,15 @@ wheels = [
[[package]] [[package]]
name = "surugaya-common" name = "surugaya-common"
version = "0.3.0" version = "0.4.0"
source = { registry = "https://git.jerryyan.net/api/packages/jp/pypi/simple" } source = { registry = "https://git.jerryyan.net/api/packages/jp/pypi/simple" }
dependencies = [ dependencies = [
{ name = "pydantic" }, { name = "pydantic" },
{ name = "redis" }, { name = "redis" },
] ]
sdist = { url = "https://git.jerryyan.net/api/packages/jp/pypi/files/surugaya-common/0.3.0/surugaya_common-0.3.0.tar.gz", hash = "sha256:578757409e8e062fd9bac32244775f4db76ba1dd8d22cb5fe4eaeab8f068c85f" } sdist = { url = "https://git.jerryyan.net/api/packages/jp/pypi/files/surugaya-common/0.4.0/surugaya_common-0.4.0.tar.gz", hash = "sha256:6621c0b7ac329c6d45c529ad9f1398c339a59d2c10f7538619b49e07bd4a50df" }
wheels = [ wheels = [
{ url = "https://git.jerryyan.net/api/packages/jp/pypi/files/surugaya-common/0.3.0/surugaya_common-0.3.0-py3-none-any.whl", hash = "sha256:281ae05a4996e4100d40abd6e5c6ffe0953cec5142745d287e1b21082c2bad1f" }, { url = "https://git.jerryyan.net/api/packages/jp/pypi/files/surugaya-common/0.4.0/surugaya_common-0.4.0-py3-none-any.whl", hash = "sha256:d1fe340b2ccb83738f707c464fa7f31c5e91754390b689cda7a880e1ea0488f3" },
] ]
[package.optional-dependencies] [package.optional-dependencies]