refactor: 重构 rss-parser 作为工具类 (#2280)

This commit is contained in:
Xiang Li
2019-06-02 13:45:52 +09:00
committed by DIYgod
parent ef631c4f55
commit 633154c778
11 changed files with 24 additions and 25 deletions

View File

@@ -1,6 +1,6 @@
const axios = require('@/utils/axios');
const parser = require('@/utils/rss-parser');
const cheerio = require('cheerio');
const Parser = require('rss-parser');
const ProcessFeed = ($, link) => {
const title = $('h1').text();
@@ -36,7 +36,6 @@ const ProcessFeed = ($, link) => {
};
const getData = async ({ site = 'www', channel }) => {
const parser = new Parser();
let feed;
if (channel) {