new file: app/amazon/__pycache__/del_brand.cpython-39.pyc
new file: app/amazon/__pycache__/main.cpython-39.pyc modified: app/amazon/del_brand.py modified: app/amazon/main.py modified: app/blueprints/__pycache__/main.cpython-39.pyc modified: app/blueprints/main.py modified: app/config.py modified: app/main.py new file: "app/web_source/brand-\346\227\247.html" modified: app/web_source/brand.html
This commit is contained in:
@@ -233,7 +233,7 @@ class ZiniaoDriver:
|
||||
# 获取店铺列表
|
||||
shop_ls = self.get_browser_list()
|
||||
self.store_id = None
|
||||
# print(shop_ls)
|
||||
print(shop_ls)
|
||||
for shop in shop_ls:
|
||||
if shop.get("browserName") == shop_name:
|
||||
self.store_id = shop.get('browserOauth')
|
||||
@@ -456,16 +456,20 @@ class AmazoneDriver(ZiniaoDriver):
|
||||
time.sleep(0.6)
|
||||
search_input = self.tab.ele("xpath://kat-input[contains(@class,'SearchBox-module__searchInput')]").sr(
|
||||
'xpath://span[@class="container"]//input[@part="input"]')
|
||||
search_input.input(asin)
|
||||
|
||||
search_input.input(asin,clear=True)
|
||||
sku_ls = []
|
||||
for _ in range(3):
|
||||
search_btn = self.tab.ele("xpath://kat-icon[@name='search']")
|
||||
search_btn.click()
|
||||
|
||||
load_ele = self.tab.ele("xpath://div[contains(@class,'Loader-module__loader')]")
|
||||
load_ele.wait.hidden(timeout=20)
|
||||
# load_ele.wait.hidden(timeout=3, raise_err=False)
|
||||
load_ele.wait.deleted(timeout=3, raise_err=False)
|
||||
time.sleep(1)
|
||||
sku_ls = self.tab.eles("//div[@data-sku]")
|
||||
|
||||
sku_ls = self.tab.eles("xpath://div[@data-sku]")
|
||||
if len(sku_ls) > 0:
|
||||
break
|
||||
return sku_ls
|
||||
|
||||
def del_action(self, sku_ele):
|
||||
@@ -473,7 +477,7 @@ class AmazoneDriver(ZiniaoDriver):
|
||||
dropdown.click()
|
||||
time.sleep(1)
|
||||
|
||||
del_btn = dropdown.ele("xpath:.//button[@role='menuitem' and text()='删除商品信息']")
|
||||
del_btn = dropdown.sr("xpath:.//button[@role='menuitem' and @data-action='DeleteListing']")
|
||||
del_btn.wait.displayed(raise_err=False)
|
||||
del_btn.click()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user