Fetch tag and category info from article (not RSS)
This commit is contained in:
+5
-1
@@ -10,8 +10,12 @@ const db = new Database('./main.db', {})
|
||||
const feedURL = 'https://dailystormer.su/feed/'
|
||||
|
||||
async function main() {
|
||||
const feed = await ds.getArticlesFromFeed(feedURL)
|
||||
const feed = await ds.fetchArticlesFromFeed(feedURL)
|
||||
Bluebird.each(feed, (async (item) => {
|
||||
const url = `https://dailystormer.su${item.slug}`
|
||||
const more = await ds.fetchArticle(url)
|
||||
item.tags = more.tags
|
||||
item.categories = more.categories
|
||||
const res = await ds.insertArticle(db, item)
|
||||
if (res.success) {
|
||||
console.warn(`+ "${item.title}"`)
|
||||
|
||||
Reference in New Issue
Block a user