D
D
Dmitry2021-03-08 23:36:51
XPath
Dmitry, 2021-03-08 23:36:51

Parser for WP Scrapes does not collect all photos from the gallery. How to fix?

When parsing using the Scrapes WP plugin, photos are duplicated, and only thumbnails are taken from the slider. Perhaps the problem is with the xpath request, since it is not set manually, but through a visual editor. Here is an example for a product:

Request:

//div[contains(concat (" ", normalize-space(@class), " "), " card-left ")]


Link to the source of goods:
18+ https://www.wildberries.am/catalog/8083488/detail....

Link to our website:
18+ https://shop.telebotpro.com/product/triviaa/

It is possible if manually compose a request for the gallery, the result would be different, but, unfortunately, I do not know how to do it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Sundukov, 2021-03-10
@alekciy

You can take data without a web driver. There, in the source code, there is a JavaScript code in which all the necessary data is:

wb.spa.init({
    router: {
        routes: routes,
        routesDictionary: routesDictionary,
        currentRoute: "SpaProductCardEntrypoint",
        modules:  {тут-данные},
        ssrModel: {...},
    },
    seoHelper: { ... }
});

You can simply load the content of the page, find wb.spa.init there with a regular routine and take the internal JSON.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question