Authored by 周少峰

send urls to baidu

@@ -14,6 +14,7 @@ const seo = require('./apps/seo'); @@ -14,6 +14,7 @@ const seo = require('./apps/seo');
14 // 定时任务 主动推送和生成xml 14 // 定时任务 主动推送和生成xml
15 seo.start(); 15 seo.start();
16 16
  17 +// seo.sendKeywordsUrls();
17 app.get('/synchronousKeywords', seo.synchronousKeywords); 18 app.get('/synchronousKeywords', seo.synchronousKeywords);
18 app.get('/sendKeywordsUrls', seo.sendKeywordsUrls); 19 app.get('/sendKeywordsUrls', seo.sendKeywordsUrls);
19 app.get('/sendUrls', seo.sendUrls); 20 app.get('/sendUrls', seo.sendUrls);
@@ -276,11 +276,9 @@ const sendKeywordsUrls = () => { @@ -276,11 +276,9 @@ const sendKeywordsUrls = () => {
276 } 276 }
277 277
278 getRedisKeywords(start, start + count).then(urls => { 278 getRedisKeywords(start, start + count).then(urls => {
279 - console.log(urls);  
280 -  
281 // 发送到百度 279 // 发送到百度
282 - // sendUrlsToBaidu({site: 'https://www.yohobuy.com'}, urls.pc);  
283 - // sendUrlsToBaidu({site: 'https://m.yohobuy.com'}, urls.wap); 280 + sendUrlsToBaidu({site: 'https://www.yohobuy.com'}, urls.pc);
  281 + sendUrlsToBaidu({site: 'https://m.yohobuy.com'}, urls.wap);
284 }).catch(() => { 282 }).catch(() => {
285 clearInterval(interval); 283 clearInterval(interval);
286 }); 284 });