diff --git a/lib/routes/gov/customs/list.js b/lib/routes/gov/customs/list.js index e29a7e808..db0a1ca02 100644 --- a/lib/routes/gov/customs/list.js +++ b/lib/routes/gov/customs/list.js @@ -23,7 +23,7 @@ module.exports = async (ctx) => { const response = await got({ method: 'get', url: link, - header: { + headers: { Referer: host, }, }); @@ -51,7 +51,7 @@ module.exports = async (ctx) => { const response = await got({ method: 'get', url: itemUrl, - header: { + headers: { Referer: host, }, }); diff --git a/lib/routes/hkej/index.js b/lib/routes/hkej/index.js index d6f587b92..2929b29b7 100644 --- a/lib/routes/hkej/index.js +++ b/lib/routes/hkej/index.js @@ -62,7 +62,7 @@ module.exports = async (ctx) => { const response = await got({ method: 'get', url: baseUrl + cat.link, - header: { + headers: { Referer: baseUrl, }, }); @@ -86,7 +86,7 @@ module.exports = async (ctx) => { const article = await got({ method: 'get', url: item.link, - header: { + headers: { Referer: cat.link, }, }); diff --git a/lib/routes/ipsw/index.js b/lib/routes/ipsw/index.js index 42978dfc7..768a0dabd 100644 --- a/lib/routes/ipsw/index.js +++ b/lib/routes/ipsw/index.js @@ -23,7 +23,7 @@ module.exports = async (ctx) => { const response = await got({ method: 'get', url: link, - header: { + headers: { Referer: host, }, }); @@ -77,7 +77,7 @@ module.exports = async (ctx) => { const response = await got({ method: 'get', url: itemUrl, - header: { + headers: { Referer: host, }, }); diff --git a/lib/routes/telecompaper/news.js b/lib/routes/telecompaper/news.js index bfde61eef..ebfaeea32 100644 --- a/lib/routes/telecompaper/news.js +++ b/lib/routes/telecompaper/news.js @@ -56,7 +56,7 @@ module.exports = async (ctx) => { method: 'post', url: rootUrl, cookieJar, - header: { + headers: { referer: 'https://www.telecompaper.com/international/news/mobile', }, body: form, diff --git a/lib/routes/zcool/top.js b/lib/routes/zcool/top.js index 099a0b7a4..e1631692d 100644 --- a/lib/routes/zcool/top.js +++ b/lib/routes/zcool/top.js @@ -8,7 +8,7 @@ module.exports = async (ctx) => { const topResponse = await got({ method: 'get', url, - header: { + headers: { Referer: 'https://www.zcool.com.cn', }, }); @@ -20,7 +20,7 @@ module.exports = async (ctx) => { const articleResponse = await got({ method: 'get', url: 'https://www.zcool.com.cn/top/article.do?rankType=8&rankId=' + rankId, - header: { + headers: { Referer: url, }, }); @@ -56,7 +56,7 @@ module.exports = async (ctx) => { const itemResponse = await got({ method: 'get', url: link, - header: { + headers: { Referer: url, }, }); diff --git a/lib/v2/95mm/utils.js b/lib/v2/95mm/utils.js index a908ea529..2a9876521 100644 --- a/lib/v2/95mm/utils.js +++ b/lib/v2/95mm/utils.js @@ -11,7 +11,7 @@ module.exports = { const response = await got({ method: 'get', url: currentUrl, - header: { + headers: { Referer: rootUrl, }, }); diff --git a/lib/v2/agirls/index.js b/lib/v2/agirls/index.js index 3122cb425..d51c782c5 100644 --- a/lib/v2/agirls/index.js +++ b/lib/v2/agirls/index.js @@ -11,7 +11,7 @@ module.exports = async (ctx) => { const response = await got({ url: baseUrl + '/posts' + (category ? `/${category}` : ''), - header: { + headers: { Referer: baseUrl, }, }); @@ -33,7 +33,7 @@ module.exports = async (ctx) => { ctx.cache.tryGet(item.link, async () => { const detailResponse = await got({ url: item.link, - header: { + headers: { Referer: baseUrl + '/posts/' + (category ? `/${category}` : ''), }, }); diff --git a/lib/v2/agirls/topic.js b/lib/v2/agirls/topic.js index b18d230e8..0167dc5d0 100644 --- a/lib/v2/agirls/topic.js +++ b/lib/v2/agirls/topic.js @@ -11,7 +11,7 @@ module.exports = async (ctx) => { const response = await got({ url: baseUrl + '/topic/' + topic, - header: { + headers: { Referer: baseUrl, }, }); @@ -33,7 +33,7 @@ module.exports = async (ctx) => { ctx.cache.tryGet(item.link, async () => { const detailResponse = await got({ url: item.link, - header: { + headers: { Referer: baseUrl + '/topic/' + topic, }, }); diff --git a/lib/v2/agirls/topic_list.js b/lib/v2/agirls/topic_list.js index 3602823e9..71abf43a0 100644 --- a/lib/v2/agirls/topic_list.js +++ b/lib/v2/agirls/topic_list.js @@ -7,7 +7,7 @@ module.exports = async (ctx) => { const response = await got({ url: baseUrl + '/' + category, - header: { + headers: { Referer: baseUrl, }, }); diff --git a/lib/v2/cbirc/index.js b/lib/v2/cbirc/index.js index 80334ccf4..4aa442e92 100644 --- a/lib/v2/cbirc/index.js +++ b/lib/v2/cbirc/index.js @@ -86,7 +86,7 @@ module.exports = async (ctx) => { const resp = await got({ method: 'get', url: cat.link, - header: { + headers: { Referer: `http://www.cbirc.gov.cn`, }, }); diff --git a/lib/v2/firefox/index.js b/lib/v2/firefox/index.js index fce9536b2..debb9e980 100644 --- a/lib/v2/firefox/index.js +++ b/lib/v2/firefox/index.js @@ -10,7 +10,7 @@ module.exports = async (ctx) => { const response = await got({ url: baseUrl + '/breaches', - header: { + headers: { Referer: baseUrl, }, }); @@ -32,14 +32,14 @@ module.exports = async (ctx) => { async () => { const article = await got({ url: item.link, - header: { + headers: { Referer: baseUrl + '/breaches', }, }); const content = cheerio.load(article.body); item.description = art(path.join(__dirname, 'templates/description.art'), { - header: content('#breach-detail').html(), + headers: content('#breach-detail').html(), overview: content('section.detail-section.jst-cntr.flx.flx-col').html(), dataClasses: content('section.detail-section.bg-white.jst-cntr.flx.flx-col').html(), }); diff --git a/lib/v2/gamer/hot.js b/lib/v2/gamer/hot.js index c55fabdc1..aa298a86b 100644 --- a/lib/v2/gamer/hot.js +++ b/lib/v2/gamer/hot.js @@ -7,7 +7,7 @@ module.exports = async (ctx) => { const rootUrl = `https://forum.gamer.com.tw/A.php?bsn=${ctx.params.bsn}`; const response = await got({ url: rootUrl, - header: { + headers: { Referer: 'https://forum.gamer.com.tw', }, }); diff --git a/lib/v2/hkej/index.js b/lib/v2/hkej/index.js index b07be54e3..afbfca634 100644 --- a/lib/v2/hkej/index.js +++ b/lib/v2/hkej/index.js @@ -64,7 +64,7 @@ module.exports = async (ctx) => { const response = await got({ method: 'get', url: baseUrl + cat.link, - header: { + headers: { Referer: baseUrl, }, }); @@ -99,7 +99,7 @@ module.exports = async (ctx) => { const article = await got({ method: 'get', url: item.link, - header: { + headers: { Referer: cat.link, }, }); diff --git a/lib/v2/hket/index.js b/lib/v2/hket/index.js index 220d6c346..47a233cd6 100644 --- a/lib/v2/hket/index.js +++ b/lib/v2/hket/index.js @@ -27,7 +27,7 @@ module.exports = async (ctx) => { const response = await got({ method: 'get', url: baseUrl + '/' + category, - header: { + headers: { Referer: 'https://www.hket.com', }, }); @@ -54,7 +54,7 @@ module.exports = async (ctx) => { const article = await got({ method: 'get', url: item.link, - header: { + headers: { Referer: baseUrl + '/' + category, }, });