Socket
Socket
Sign inDemoInstall

wordpress-posts-crawler

Package Overview
Dependencies
91
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    wordpress-posts-crawler

Wordpress posts crawler for node.js


Version published
Weekly downloads
6
Maintainers
1
Install size
8.29 MB
Created
Weekly downloads
 

Readme

Source

WORDPRESS crawler

A crawler for articles of wordpress

Install

npm install wordpress-posts-crawler --save-dev

Usage

.findAll()
/**
@param {object} opts - options
@param {string} opts.url - Url of blog (wordpress) that you want to crawl the lists.
@returns {ArticleShallow}
*/
example
import wordpress from 'wordpress-posts-crawler'

let articles = await wordpress.findAll({ url: 'http://path/to/wordpress/category/list/' })
// expect array
console.log(articles[0])
.find()
/**
@param {object} opts - options
@param {string} opts.url - Url of article that you want to crawl the detail.
@returns {Article}
*/
Example
import wordpress from 'wordpress-posts-crawler'

let article = await wordpress.find({ url: 'http://path/to/wordpress/post/id' })
// expect object
console.log(article)

Interface

ArticleShallow
/**
@interface ArticleShallow
@prop {string} url - Url of article
@prop {string} published - Published of article (format ISO8601)
@prop {string} title - Title of article
*/
Article
/**
@interface Article
@prop {string} url - Url of article
@prop {string} published - Published of article (format ISO8601)
@prop {string} title - Title of article
@prop {string[]} address - Tawian Address format
@prop {string} cover - Url
@prop {string} body - HTML
@prop {string[]} images - Url
*/

Development flow

vi src/index.js
:wq
npm test
npm run build
git commit -m 'dev'

test

npm test

Keywords

FAQs

Last updated on 24 Sep 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc