2

I was scraping product details with beautifulsoup from aliexpress. But that is too slow and too much of a hassle.

So I signed up for the aliexpress API. Everything works. But how can I get the description of products using the API?

I found nothing in the help center. Google also does not have anything. I am also using

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

It seems to me that it is not possible to get the description with the API? The documentation for the API is very poor imo.


Right now I am using this call:
http://gw.api.alibaba.com/openapi/param2/2/portals.open/api.listPromotionProduct/MY_API_KEY?fields=imageUrl,productId&keywords=chess&highQualityItems=yes
This call only returns the image, product id for products with the keyword "chess".
But how can I also get the description?

4

2 回答 2

2

Comment: how can I get the description?

The API provide the following details, there is no description.
I assume you have to get it from the 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?

What do you get using the following:

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)
于 2017-08-23T13:11:58.323 回答
0

If you are looking for a node.js package then, I have written a scraper and made it available as an npm package. This would give you complete information about the product as JSON response. You would receive feedbacks, product images, description, product info including stock details etc.,

https://github.com/sudheer-ranga/aliexpress-product-scraper

https://www.npmjs.com/package/aliexpress-product-scraper

Install the npm package npm i aliexpress-product-scraper

Get product details:

const scrape = require('aliexpress-product-scraper');
const product = scrape('32958933105');

product.then(res => {
  console.log('Product Details JSON: ', res);
});
于 2020-04-18T06:37:03.537 回答