如何使用API从Aliexpress获取产品描述?

2024-10-01 09:21:58 发布

您现在位置:Python中文网/ 问答频道 /正文

我从aliexpress上用beautifulsoup抓取产品细节。但这太慢了,太麻烦了。在

所以我注册了aliexpress API。一切正常。但是如何使用API获取产品的描述?

我在帮助中心什么也没发现。谷歌也没有任何东西。我也在使用

https://github.com/EitherSoft/python-aliexpress-api-client

在我看来,用API来获取描述是不可能的?API的文档在imo中很差


现在我正在使用这个电话:
http://gw.api.alibaba.com/openapi/param2/2/portals.open/api.listPromotionProduct/MY_API_KEY?fields=imageUrl,productId&keywords=chess&highQualityItems=yes
对于产品,只返回带有关键字“.br/> 但是我怎样才能得到描述呢?在


Tags: 文档httpsgithubcomclientapi产品中心
1条回答
网友
1楼 · 发布于 2024-10-01 09:21:58

Comment: how can I get the description?

API提供了以下详细信息,没有description
我想你必须从productUrl那里得到它。在

config.py
'details': [ 'productId', 'productTitle', 'productUrl', 'imageUrl', 'originalPrice', 'salePrice', 'discount', 'evaluateScore', 'commission', 'commissionRate', '30daysCommission', 'volume', 'packageType', 'lotNum', 'validTime', 'storeName', 'storeUrl', 'allImageUrls',


Question: . I do not quite know what you mean?

使用以下工具可以得到什么:

from aliexpress_api_client import AliExpress
aliexpress = AliExpress('api_key', 'affiliate_id')

#Get product details:
product = aliexpress.get_product_details(['productId', 'productTitle', 'salePrice'], product_id)
print(product)

相关问题 更多 >