Jérémy M Jérémy M - 1 year ago 31
Node.js Question

Get all articles from one category from wordpress website with nodeJS

I need to get all articles from the category "parents" of a wordpress website.
I can access to this all articles with this url : https://smerra.fr/acategory/parents .

I can't just get the html of this page because I need all articles with the text of each article and not a button "read more" with a link.

I try to get all posts thanks to the nodejs plugin "wordpress" (https://github.com/scottgonzalez/node-wordpress) with the function getPosts but I succeded to just get articles from the standard url of the website (so here, I get just articles from smerra.fr/)

Someone has an idea ?

Kind regards

Answer Source

If I'm understanding correctly then I think you can achieve this by using the RSS feed of a wordpress site.

The link you have in your question doesn't work for me, but using the RSS feed for a category you'll get the articles in nice, easy to parse XML that you can then do whatever you want with.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download