util/syncData.js
Function articleInfo
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function articleInfo() {
var articleTitles = [];
// console.log('获取数据开始');
getURL.getPageContent('/', function (err, gres, next) {
Function getCollections
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getCollections() {
var now = moment().format('x');
var collectionsList = [];
for (var i = 0; i <= 50; i++){
collectionsList.push({
Function fetchCollectionUrl
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var fetchCollectionUrl = function (collectionUrl, callback) {
var delay = parseInt((Math.random() * 10000000) % 2000, 10);
conCurrencyCount++;
getURL.getPageContent(collectionUrl.url, function (err, res) {
Function fetchUrl
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var fetchUrl = function (article, callback) {
var delay = parseInt((Math.random() * 10000000) % 2000, 10);
conCurrencyCount++;
// console.log('并发数:' + conCurrencyCount + ',访问的页面是:' + article.authorHref + ',控制的延迟:' + delay);
getURL.getPageContent(article.authorHref, function (err, res) {