A
A
AlbertS0012018-06-17 12:20:03
Parsing
AlbertS001, 2018-06-17 12:20:03

How does the parser work (example inside)?

There are many dobony sites, for example www.omdrug.ru/information/drugs.php there is a search for drugs with a price in pharmacies. The parser takes data from another site. How does he enter them into the database so that the name of the medicine and the pharmacy in which it is available and the price are displayed? Is there an aggregated table? Help me to understand.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Sukhanov, 2018-06-17
@xazbix

I dealt with one such site for spare parts, where parsers took information from different sites, and then only the necessary information was displayed, according to the addition of% to their price (without using any databases).
If the visitor clicked on add to cart, then a third-party script wrote this data to the product and added it to the cart of the engine.
I don’t remember the engine of the site, maybe opencart

Y
Yan-s, 2018-06-17
@Yan-s

How does he enter them into the database so that the name of the medicine and the pharmacy in which it is available and the price are displayed?

What is the difficulty? Are you wondering how the parser can distinguish this data? Perhaps the parser was specially prepared for this site, there are many libraries for parsing the DOM, they allow you to take some data from certain page structures. For example, take the name of the preparator from the h1 tag, and take the price from the div with the price class.
Perhaps the parser works with specially marked data, sites themselves can provide information in a special format for aggregators, such as Yandex Market.
Perhaps the parser is automatic, does not require manual compilation of rules for each site, but uses, for example, micro-markup.
Usually yes. If we are talking about the aggregator parser, then almost always.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question