ey-commerce-lib 1.0.18__tar.gz → 1.0.19__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ey-commerce-lib might be problematic. Click here for more details.
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/PKG-INFO +1 -1
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/pyproject.toml +1 -1
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/dxm/main.py +25 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/dxm/parser/order.py +13 -11
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/.gitignore +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/.python-version +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/README.md +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/pytest.ini +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/__init__.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/dxm/__init__.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/dxm/constant/__init__.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/dxm/constant/order.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/dxm/exception/__init__.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/dxm/exception/common.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/dxm/order.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/dxm/parser/__init__.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/dxm/parser/common.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/dxm/parser/count.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/dxm/parser/ebay_product.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/dxm/parser/purchase.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/dxm/parser/tracking.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/dxm/parser/warehouse.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/dxm/schemas/__init__.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/dxm/schemas/common.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/dxm/schemas/dxm_commodity_product.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/dxm/schemas/ebay_product.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/dxm/schemas/order.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/dxm/schemas/tracking.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/dxm/schemas/warehouse.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/dxm/utils/__init__.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/dxm/utils/dxm_commodity_product.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/dxm/utils/mark.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/four_seller/__init__.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/four_seller/constant/__init__.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/four_seller/constant/response.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/four_seller/main.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/four_seller/parser/__init__.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/four_seller/parser/order.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/four_seller/schemas/__init__.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/four_seller/schemas/query/__init__.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/four_seller/schemas/query/order.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/four_seller/schemas/vo/__init__.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/four_seller/schemas/vo/order.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/kogan/__init__.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/kogan/main.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/kogan/schemas/__init__.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/kogan/schemas/query/__init__.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/kogan/schemas/query/order.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/kogan/schemas/query/product.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/kogan/schemas/response/__init__.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/kogan/schemas/response/order.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/kogan/schemas/response/product.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/model.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/py.typed +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/takesend/__init__.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/takesend/config.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/takesend/main.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/utils/__init__.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/utils/close.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/utils/dxm.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/utils/float.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/utils/list_util.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/utils/str.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/tests/__init__.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/tests/dxm/__init__.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/tests/dxm/test_purchase.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/tests/kogan/__init__.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/tests/kogan/test_client.py +0 -0
- {ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/uv.lock +0 -0
|
@@ -822,6 +822,31 @@ class DxmClient:
|
|
|
822
822
|
result.extend(page_data.records)
|
|
823
823
|
return result
|
|
824
824
|
|
|
825
|
+
async def tracking_show_detail(self, tracking_number: str, carrier_code: str):
|
|
826
|
+
"""
|
|
827
|
+
物流追踪详情信息
|
|
828
|
+
"""
|
|
829
|
+
async with self.__sem:
|
|
830
|
+
tracking_show_detail_response = await self.__async_client.post('/tracking/showDetail.json', data={
|
|
831
|
+
"trackingNumber": tracking_number,
|
|
832
|
+
"carrierCode": carrier_code
|
|
833
|
+
})
|
|
834
|
+
return tracking_show_detail_response.json()
|
|
835
|
+
|
|
836
|
+
async def order_prior_or_ban_ship(self, package_id: str, type_value: str):
|
|
837
|
+
"""
|
|
838
|
+
禁运或优先发货
|
|
839
|
+
:param package_id:
|
|
840
|
+
:param type_value:
|
|
841
|
+
:return:
|
|
842
|
+
"""
|
|
843
|
+
async with self.__sem:
|
|
844
|
+
order_prior_or_ban_ship_response = await self.__async_client.post('/order/orderPriorOrBanShip.json', data={
|
|
845
|
+
'packageId': package_id,
|
|
846
|
+
'type': type_value,
|
|
847
|
+
})
|
|
848
|
+
return order_prior_or_ban_ship_response.json()
|
|
849
|
+
|
|
825
850
|
async def __aenter__(self):
|
|
826
851
|
return self
|
|
827
852
|
|
|
@@ -37,13 +37,13 @@ def get_single_order_item_list(order_element: html.HtmlElement):
|
|
|
37
37
|
source_presentation_element_list = [source_presentation_element.strip().split(':')[1]
|
|
38
38
|
for source_presentation_element in source_presentation_element_list]
|
|
39
39
|
try:
|
|
40
|
-
float(price.replace(',', ''))
|
|
41
|
-
except:
|
|
42
|
-
|
|
40
|
+
price = float(price.replace(',', ''))
|
|
41
|
+
except Exception:
|
|
42
|
+
price = None
|
|
43
43
|
sku_list.append({
|
|
44
44
|
'sku': sku,
|
|
45
45
|
'quantity': int(quantity),
|
|
46
|
-
'price':
|
|
46
|
+
'price': price,
|
|
47
47
|
'currency': currency,
|
|
48
48
|
'img': img,
|
|
49
49
|
'variants': variant_list,
|
|
@@ -319,21 +319,23 @@ def get_order_detail_by_html(html_str: str):
|
|
|
319
319
|
pair_info_sku = pair_info_element.xpath('.//span[@class="pairProInfoSku"]/text()')[0].split(' x')[0].strip()
|
|
320
320
|
pair_info_sku_quantity = int(pair_info_element.xpath('.//span[@class="pairProInfoSku"]/span/text()')[0].strip())
|
|
321
321
|
proid = get_str_list_first_not_blank_or_none(pair_info_element.xpath('.//input[@proid]/@proid'))
|
|
322
|
-
# warehouse_sku, warehouse_sku_quantity = pair_info_element.xpath(
|
|
323
|
-
# './/div[contains(@class, "normalDiv")]/p[1]/text()')[0].split(' x ')
|
|
324
322
|
warehouse_sku_info_list = pair_info_element.xpath('.//div[contains(@class, "normalDiv")]/p[1]/text()')
|
|
325
323
|
warehouse_sku, warehouse_sku_quantity = None, None
|
|
326
324
|
if len(warehouse_sku_info_list) > 0:
|
|
327
325
|
warehouse_sku_info = warehouse_sku_info_list[0]
|
|
328
326
|
warehouse_sku, warehouse_sku_quantity = warehouse_sku_info.split(' x ')
|
|
329
327
|
|
|
328
|
+
# 获取可用库存
|
|
330
329
|
warehouse_available_quantity_element_list = pair_info_element.xpath(
|
|
331
330
|
'.//div[contains(@class, "normalDiv")]/p[2]/span[2]/text()')
|
|
332
|
-
warehouse_available_quantity_str = warehouse_available_quantity_element_list
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
331
|
+
warehouse_available_quantity_str = get_str_list_first_not_blank_or_none(warehouse_available_quantity_element_list)
|
|
332
|
+
# 获取到可用库存节点
|
|
333
|
+
if warehouse_available_quantity_str is not None:
|
|
334
|
+
if warehouse_available_quantity_str.endswith('+'):
|
|
335
|
+
warehouse_available_quantity_str = warehouse_available_quantity_str[:-1]
|
|
336
|
+
warehouse_available_quantity = int(warehouse_available_quantity_str)
|
|
337
|
+
else:
|
|
338
|
+
warehouse_available_quantity = None
|
|
337
339
|
pair_info_list.append({
|
|
338
340
|
'pair_info_sku': pair_info_sku,
|
|
339
341
|
'pair_info_sku_quantity': pair_info_sku_quantity,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/dxm/constant/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/dxm/exception/__init__.py
RENAMED
|
File without changes
|
{ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/dxm/exception/common.py
RENAMED
|
File without changes
|
|
File without changes
|
{ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/dxm/parser/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/dxm/parser/ebay_product.py
RENAMED
|
File without changes
|
{ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/dxm/parser/purchase.py
RENAMED
|
File without changes
|
{ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/dxm/parser/tracking.py
RENAMED
|
File without changes
|
{ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/dxm/parser/warehouse.py
RENAMED
|
File without changes
|
{ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/dxm/schemas/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/dxm/schemas/ebay_product.py
RENAMED
|
File without changes
|
|
File without changes
|
{ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/dxm/schemas/tracking.py
RENAMED
|
File without changes
|
{ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/dxm/schemas/warehouse.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/four_seller/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/four_seller/parser/__init__.py
RENAMED
|
File without changes
|
{ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/four_seller/parser/order.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/kogan/schemas/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/kogan/schemas/query/order.py
RENAMED
|
File without changes
|
{ey_commerce_lib-1.0.18 → ey_commerce_lib-1.0.19}/src/ey_commerce_lib/kogan/schemas/query/product.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|