Skip to main content

Shop::Wildberries::ProductsList: Wildberries product list parser

img

Shop::Wildberries::ProductsList product parser overview

Using the Wildberries product parser, you can get data about products from search results by keyword or from a list of products of a specific category or brand. With its help, you can collect a database of links to products, track the dynamics of prices for products, changes in the number of reviews or ratings, collect product images or information about available colors and sizes. Also, a separate list of advertising announcements is collected with an indication of the position of each in organic search results. The parser provides the ability to set the sorting of results and specify the delivery point.

A-Parser functionality allows you to save parsing settings for further use (presets), set a parsing schedule, and much more. You can use automatic query multiplication, substitution of subqueries from files, enumeration of alphanumeric combinations and lists to obtain the maximum possible number of results.

Collected data

img

  • Number of products
  • Product name
  • Link to the product
  • Product image
  • Brand
  • Price and old price
  • Rating and number of reviews
  • Sizes and/or colors
  • For advertising announcements - position in the list of products
  • List of keys from "Also looking for" and "You may also like"

Usage options

  • Collecting links to products
  • Evaluating the popularity of products
  • Tracking the dynamics of prices and popularity of products
  • Collecting an array of product images
  • Determining the positions of advertising announcements

Query examples

You can use the following as queries:

  • links to a brand's list of products, for example:
https://www.wildberries.ru/brands/kristiano-fashion
https://www.wildberries.ru/brands/s-a-s
  • links to a list of products in a category, for example:
https://www.wildberries.ru/catalog/elektronika/razvlecheniya-i-gadzhety/igrovye-konsoli/playstation
https://www.wildberries.ru/catalog/avtotovary/shiny-i-diski/shiny
  • keywords, just like if you were entering them directly into the Wildberries search form, for example:
xiaomi mi10
футболки и майки
магнитола

Query substitutions

When using keywords as queries, you can use built-in macros to expand queries, for example, if you need to get more results than the usual search results provide.

For example, for the above keywords, we will specify the substitution of characters from a to zzzz in the query format, this method allows you to rotate the search results to the maximum and get many new unique results:

$query {az:a:zzzz}

This macro will create 475254 additional queries for each original search query, which will give a total of 4 x 475254 = 1901016 search queries, an impressive number, but it's not a problem for A-Parser.

Result output options

Output to csv

You can use the Template-Toolkit template engine to output the result to csv, for example, we can write such columns to a csv file: Product link, Product name, Price, Old price, Rating, Number of reviews

Result format:

[% FOREACH item IN items; 
tools.CSVline(item.link, item.name, item.price, item.oldPrice, item.rating, item.reviews);
END %]

Example result:

https://www.wildberries.ru/catalog/54067214/detail.aspx,"Шапка бини женская",703,1900,5,6
https://www.wildberries.ru/catalog/41415461/detail.aspx,"Шапка бини женская / бини с отворотом / Бини (beanie)",1487,1750,5,346
https://www.wildberries.ru/catalog/16782596/detail.aspx,"Шапка бини женская / бини с отворотом / Бини (beanie)",1487,1750,5,346
https://www.wildberries.ru/catalog/9468600/detail.aspx,"Шапка с шарфом / с перчатками / бини женская",2700,4500,5,137
https://www.wildberries.ru/catalog/4750212/detail.aspx,"Берет",765,1075,5,349
https://www.wildberries.ru/catalog/9793364/detail.aspx,"Берет с шарфом",3297,4710,5,307

Output of brand, name, and prices

Result format:

$items.format('$brand, $name, $price\n')

Example result:

Xiaomi, Смартфон Poco X3 Pro / 6.67'' / 2400x1080 / IPS / 8 ГБ / 256 ГБ / 5160 мА*ч, 23751
Realme, Смартфон realme 8 / 6.4'' / 2400x1080 / Super AMOLED / 6 ГБ / 128 ГБ / 5000 mAh, 19911
Apple, Смартфон iPhone 11 128GB / 6.1'' / 1792x828 / Liquid Retina HD / 128 ГБ, 54990
Apple, Смартфон iPhone 12 128GB / 6.1'' / 2532x1170 / OLED / 128 ГБ, 69990
Samsung, Смартфон Galaxy A32 / 6.4'' / 2400x1080 / Super AMOLED / 4 ГБ / 128 ГБ / 5000 мАч, 19791

Output with variable names

Result format:

$items.format('Бренд: $brand, Название: $name, Цена: $price\n')

Example result:

Бренд: Samsung, Название: Смартфон Galaxy A32 / 6.4'' / 2400x1080 / Super AMOLED / 4 ГБ / 128 ГБ / 5000 мАч, Цена: 19791
Бренд: Realme, Название: Смартфон realme 8 / 6.4'' / 2400x1080 / Super AMOLED / 6 ГБ / 128 ГБ / 5000 mAh, Цена: 19911
Бренд: Honor, Название: Смартфон Honor 50 / 6.57'' / 2340x1080 / OLED / 6 ГБ / 128 ГБ / 4300 мА*ч, Цена: 31490
Бренд: Apple, Название: Смартфон iPhone 13 256GB / 6.1'' / 2532x1170 / OLED / 256 ГБ, Цена: 89990
Бренд: Xiaomi, Название: Смартфон 6.53'' / 1600x720 / 2 ГБ / 32 ГБ / 5000 мА*ч, Цена: 8990

Output with a new variable

Let's output the result with the discount variable, which will show the percentage of the discount on the product.

Result format:

[% USE Math;
FOREACH item IN p1.items;
discount = item.oldPrice ? (item.oldPrice - item.price) / item.oldPrice * 100 : 0;
tools.CSVline(item.name, item.price, Math.int(discount + 0.5) _ '%');
END %]

Example result:

"Смартфон Poco X3 Pro / 6.67'' / 2400x1080 / IPS / 8 ГБ / 256 ГБ / 5160 мА*ч",23751,12%
"Смартфон realme 8 / 6.4'' / 2400x1080 / Super AMOLED / 6 ГБ / 128 ГБ / 5000 mAh",19911,17%
"Смартфон iPhone 12 128GB / 6.1'' / 2532x1170 / OLED / 128 ГБ",69990,0%
"Смартфон Galaxy A32 / 6.4'' / 2400x1080 / Super AMOLED / 4 ГБ / 128 ГБ / 5000 мАч",19791,10%
"Смартфон galaxy a52 / 6.5'' / 1080x2400 / Super AMOLED / 8 ГБ / 256 ГБ / 4500 мА*ч",28691,18%

Saving in SQL dump format

Result format:

[% FOREACH item IN p1.items;
"INSERT INTO products VALUES('" _ item.name _ "', '"; item.link _ "', '"; item.price _ "', '"; item.brand _ "')\n";
END %]

Example result:

INSERT INTO products VALUES('Смартфон 6.53'' / 1600x720 / 2 ГБ / 32 ГБ / 5000 мА*ч', 'https://www.wildberries.ru/catalog/13615125/detail.aspx', '8990', 'Xiaomi')
INSERT INTO products VALUES('Смартфон galaxy a52 / 6.5'' / 1080x2400 / Super AMOLED / 4 ГБ / 128 ГБ / 4500 мА*ч', 'https://www.wildberries.ru/catalog/23155682/detail.aspx', '24291', 'Samsung')
INSERT INTO products VALUES('Смартфон 6.53'' / 1600x720 / 2 ГБ / 32 ГБ / 5000 мА*ч', 'https://www.wildberries.ru/catalog/13615126/detail.aspx', '8990', 'Xiaomi')

Dumping results to JSON

Result format:

[% data = {};
data.query = query;
data.items = [];
FOREACH item IN p1.items;
data.items.push({
link = item.link
name = item.name
price = item.price
});
END;
data.json %]
{
"query": "смартфон",
"items": [
{
"link": "https://www.wildberries.ru/catalog/27379808/detail.aspx",
"name": "Смартфон realme 8 / 6.4'' / 2400x1080 / Super AMOLED / 6 ГБ / 128 ГБ / 5000 mAh",
"price": 19911
},
{
"link": "https://www.wildberries.ru/catalog/16023994/detail.aspx",
"name": "Смартфон iPhone 11 128GB / 6.1'' / 1792x828 / Liquid Retina HD / 128 ГБ",
"price": 54990
},
{
"link": "https://www.wildberries.ru/catalog/15875669/detail.aspx",
"name": "Смартфон iPhone 12 128GB / 6.1'' / 2532x1170 / OLED / 128 ГБ",
"price": 69990
},
...
]
}

Output of the result with the parsing date

Let's output the result with the parsing dates.

Result format:

[% USE d = date(format = '%Y %m %d %H:%M', locale = 'C');
FOREACH item IN p1.items;
tools.CSVline(d.format(), item.name, item.price, item.link);
END %]

Example result:

"2022 01 26 10:15","Смартфон 6.53'' / 1600x720 / 2 ГБ / 32 ГБ / 5000 мА*ч",8990,https://www.wildberries.ru/catalog/13615126/detail.aspx
"2022 01 26 10:15","Смартфон iPhone 13 128GB / 6.1'' / 2532x1170 / OLED / 128 ГБ",74390,https://www.wildberries.ru/catalog/40640907/detail.aspx
"2022 01 26 10:15","Смартфон Galaxy S21 256GB / 6.2'' / Dynamic AMOLED / 8 ГБ / 256 ГБ / 4000 мА*ч",64791,https://www.wildberries.ru/catalog/18592983/detail.aspx
"2022 01 26 10:15","Смартфон Galaxy M22 / 6.4'' / 720x1600 / Super AMOLED / 4 ГБ / 128 ГБ / 5000 мAh",17280,https://www.wildberries.ru/catalog/41501725/detail.aspx

Possible settings

ParameterDefault valueDescription
Pages count5Number of pages for parsing
Sort byPopularitySorting of results
Address-Delivery point address
Longitude-Delivery point longitude
Latitude-Delivery point latitude
info

By default, Wildberries displays results for Moscow. The parser allows you to set a pickup point, and the list of results will be tied to a specific location. To do this, you need to override 3 parameters: Address, Longitude, and Latitude. You can get the necessary values for these parameters in the browser:

1. Select the desired pickup point, previously opening the Developer Tools (F12 key in Chrome)

img

2. In the Developer Tools, on the Network tab, find the saveprefereduserloc request and see the necessary data in the request body

img

3. Copy them exactly into the parser settings

img