npm install blogger-posts-crawler --save
@name findAll
@param {object} options
@param {boolean} [options.fetchAll=false] - If you want to retrieve all the articles form google.
@param {string} options.url - Url of Blogspot.
@param {string} options.key - Server-side API access token from Google Blogger API.
@returns {Article[]}
import crawler from 'blogger-posts-crawler'
let articles = await crawler.findAll({
url: 'http://happycloud2013.blogspot.tw/',
fetchAll: false,
key: YOUR_API_KEY,
})
console.log(articles) // {Article[]}
@name Article
@interface
@prop {string[]} address
@prop {string} body - Content of article
@prop {string} cover - Generally first element of Article.images
@prop {string[]} images - Contain URL format in the array.
@prop {string} published - ISO8601 format
@prop {string} title
@prop {string} url
vi src/index.js
:wq
npm test
git commit -m 'minor changes'