Authored by 周少峰

send urls to baidu

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