Good day. How to implement php parser to get content from js site. And then didom disassemble it.

Closed due to the fact that it is necessary to reformulate the question so that it was possible to give an objectively correct answer by the participants Akina , user207618, Denis , Regent , Qwertiy 17 Feb '17 at 15:38 .

The question gives rise to endless debates and discussions based not on knowledge, but on opinions. To get an answer, rephrase your question so that it can be given an unambiguously correct answer, or delete the question altogether. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • Sorry, but what answer do you expect? What is your parser writing for you? Or that you will be provided with a ready-made parser for any site? Refer to the freelancers exchange, they will be able to help you there, but for the money. - Stanislav Belichenko February
  • I asked what means by the library. I do not need a ready one. I need to know what to use. PhantomJs, Selenium and before. - Alexander Mephistopheles
  • Grubbers are usually individual. Analyze the structure, look for how the information is sucked in and collect. Although grabbers are bad, negotiate an API with the owner. - user207618
  • @Alexander Mephistopheles Selenium uses the browser more precisely as a driver, and the driver doesn’t do any parsing with the browser and selenium! - fens
  • Selenium some use for parsing - Alexander Mephistopheles

2 answers 2

If you want to get the final page with the JS on it, use PhantomJS.

But first, curl it and see the contents. Perhaps the data you need on it is in the form, for example, JSON, and the script simply builds a page based on them. Thus, for example, Steam comes with comments. The final page (with a very large number of comments) weighs several times more than the original with packed JSON data.

    There is a possibility that websites written on js have a version for search bots, try sending a request with a user-agent like googlebot