modified: amazon/__pycache__/detail_spider.cpython-39.pyc

modified:   amazon/__pycache__/price_match.cpython-39.pyc
	modified:   amazon/detail_spider.py
	modified:   amazon/price_match.py
	modified:   blueprints/__pycache__/admin.cpython-39.pyc
	modified:   blueprints/__pycache__/brand.cpython-39.pyc
	modified:   blueprints/__pycache__/main.cpython-39.pyc
	modified:   brand_spider/__pycache__/main.cpython-39.pyc
	modified:   main.py
	modified:   web_source/brand.html
This commit is contained in:
铭坤
2026-04-28 21:11:48 +08:00
parent 1f2ddf2670
commit 9dbb5705a9
10 changed files with 7965 additions and 131 deletions
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large Load Diff
+25 -28
View File
@@ -625,7 +625,7 @@ class AmzonePriceMatch(AmamzonBase):
if len(page_pamel) > 0:
current_page = page_pamel[0].sr('xpath:.//ul[@class="pages"]//li[@aria-current="true"]').text
#测试=====
# if int(current_page) > 3:
# if int(current_page) > 3:c
# break
# 测试===========
@@ -790,7 +790,7 @@ class AmzonePriceMatch(AmamzonBase):
"cartShopName" : cartShopName,
"shippingFee" : f"{shipping_fee}",
"priceChangeStatus" : f"{adjust_prices}",
"modifyCount" : "1",
"priceChangeStatus" : "改价成功",
})
else:
recommendedPrice = recommend_price + shipping_fee
@@ -808,8 +808,7 @@ class AmzonePriceMatch(AmamzonBase):
"secondPlace": price_2,
"cartShopName": cartShopName,
"shippingFee": f"{shipping_fee}",
"priceChangeStatus": "",
"modifyCount": "0",
"priceChangeStatus": "跳过,无需改价",
})
already_asin.add(asin)
@@ -1333,36 +1332,34 @@ class PriceTask:
"""
url = f"{DELETE_BRAND_API_BASE}/api/price-track/tasks/{task_id}/result"
country_aliases = {name: code for code, name in self.country_info.items()}
country_key = country_aliases.get(str(country_code).strip(), str(country_code).strip())
countries = {}
if asin or status:
countries[country_key] = [
{
"shopMallName": shopMallName,
"asin": asin,
"price": status.get("currentPrice") if status.get("currentPrice") else "",
"recommendedPrice": status.get("recommendedPrice") if status.get("recommendedPrice") else "",
"minimumPrice": status.get("minimumPrice") if status.get("minimumPrice") else "",
"firstPlace": status.get("firstPlace") if status.get("firstPlace") else "",
"secondPlace": status.get("secondPlace") if status.get("secondPlace") else "",
"cartShopName": status.get("cartShopName") if status.get("cartShopName") else "",
"priceChangeStatus": status.get("priceChangeStatus") if status.get("priceChangeStatus") else "",
"deleteSkipAsin": status.get("deleteSkipAsin", False),
"removeAsin": status.get("removeAsin") if status.get("removeAsin") else "",
"modifyCount": status.get("modifyCount") if status.get("modifyCount") else "",
"shippingFee": status.get("shippingFee") if status.get("shippingFee") else "",
"status": status.get("statu")
}
]
payload = {
"shops": [
{
"shopName": shop_name,
"countries": countries,
"countries": {
country_key : [
{
"shopMallName": shopMallName,
"asin": asin,
"price": status.get("currentPrice") if status.get("currentPrice") else "",
"recommendedPrice": status.get("recommendedPrice") if status.get("recommendedPrice") else "",
"minimumPrice": status.get("minimumPrice") if status.get("minimumPrice") else "",
"firstPlace": status.get("firstPlace") if status.get("firstPlace") else "",
"secondPlace": status.get("secondPlace") if status.get("secondPlace") else "",
"cartShopName": status.get("cartShopName") if status.get("cartShopName") else "",
"priceChangeStatus": "UPDATED",
"deleteSkipAsin": status.get("deleteSkipAsin",False),
"removeAsin": status.get("removeAsin") if status.get("removeAsin") else "",
"modifyCount": "1",
"shippingFee" : status.get("shippingFee") if status.get("shippingFee") else "",
"status": status.get("statu"),
"priceChangeStatus" : status.get("priceChangeStatus") if status.get("priceChangeStatus") else "",
}
]
},
"error": ""
}
]
@@ -1449,4 +1446,4 @@ if __name__ == '__main__':
front_end_data, current_Price, current_shop_name,
recommended_price, recommended_shipping
)
print(res)
print(res)