Answer the question
In order to leave comments, you need to log in
Parser from Yandex in WordPress?
Good day. I want to try writing a news parser with Ya in WordPress. Please advise which library is better to use for such purposes? I am currently planning PHP Simple Dom + Curl. And is it better to write the parsing result to the WordPress posts table and run the scripts through Cron or display the results directly through the parser itself? And what reefs can be in such task?
Answer the question
In order to leave comments, you need to log in
If you parse html, then the tools are basically correct, maybe you should compare PHP Simple Dom with other libraries for parsing dom and it’s nice to wrap curl with something to make it more pleasant to send requests and receive responses.
If you work with a feed, then you will not need to parse the dom.
If the results of the parsing will form the permanent content of the site, then into the table. It really depends on the details of your idea.
Yandex is quite jealous of the parsing of its content. After a certain number of suspicious requests, you can start receiving captcha. You'll have to get around it somehow.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question