R
R
romaro2021-10-07 12:13:02
Python
romaro, 2021-10-07 12:13:02

Why are parsers more often written in Python?

When creating web scrapers or price lists, the Python language is almost always offered. Does it have something to do with the peculiarities of its standard library? Why do parsers write much less frequently in JS?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Kuts, 2021-10-07
@fox_12

Probably a fairly developed set of libraries and a minimum of a boilerplate, and the popularity of the language.
For example, here is the code that receives a list of links from the site - it took me just a couple of minutes from writing to getting the result:
615ebfb11aa80460348924.png

D
d-sem, 2021-10-07
@d-sem

It is connected purely with the current popularity of the language. Plus, quite simple parsing is often needed to get the html of the page, which can be implemented in any language.
At the same time, on the same JS using https://github.com/puppeteer/puppeteer it is much easier to parse complex modern sites with a lot of dynamics.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question