From 9a3bea3525457b297339306dbbf49cde6dc3ab9e Mon Sep 17 00:00:00 2001 From: DIYgod Date: Wed, 28 Aug 2019 14:38:19 +0800 Subject: [PATCH] feat: remove referrerpolicy in routes --- docs/en/joinus/README.md | 2 +- docs/joinus/README.md | 4 ++-- lib/routes/005tv/zx.js | 2 +- lib/routes/9to5/utils.js | 2 +- lib/routes/acfun/bangumi.js | 2 +- lib/routes/acfun/video.js | 2 +- lib/routes/anigamer/anime.js | 2 +- lib/routes/animen/news.js | 2 +- lib/routes/apkpure/versions.js | 2 +- lib/routes/apple/appstore/gofans.js | 2 +- lib/routes/apple/appstore/xianmian.js | 2 +- lib/routes/aptonic/action.js | 2 +- lib/routes/aqicn/index.js | 2 +- lib/routes/atfd/index.js | 2 +- lib/routes/autotrader/index.js | 2 +- lib/routes/baidu/doodles.js | 2 +- lib/routes/bangumi/calendar/today.js | 2 +- lib/routes/bangumi/subject/ep.js | 2 +- lib/routes/bbc/utils.js | 9 +++------ lib/routes/bilibili/article.js | 2 +- lib/routes/bilibili/audio.js | 2 +- lib/routes/bilibili/bangumi.js | 2 +- lib/routes/bilibili/coin.js | 2 +- lib/routes/bilibili/dynamic.js | 4 ++-- lib/routes/bilibili/followings_video.js | 2 +- lib/routes/bilibili/linkNews.js | 2 +- lib/routes/bilibili/mallIP.js | 2 +- lib/routes/bilibili/mallNew.js | 4 +--- lib/routes/bilibili/partion-ranking.js | 2 +- lib/routes/bilibili/partion.js | 2 +- lib/routes/bilibili/topic.js | 4 ++-- lib/routes/bilibili/userChannel.js | 2 +- lib/routes/bilibili/userFav.js | 2 +- lib/routes/bilibili/user_bangumi.js | 2 +- lib/routes/bilibili/utils.js | 2 +- lib/routes/bilibili/video.js | 2 +- lib/routes/bilibili/vsearch.js | 2 +- lib/routes/bing/index.js | 2 +- lib/routes/bjp/apod.js | 2 +- lib/routes/cartoonmad/comic.js | 2 +- lib/routes/cctv/utils/news.js | 2 +- lib/routes/chouti/index.js | 2 +- lib/routes/coolbuy/newest.js | 4 ++-- lib/routes/dbmv/index.js | 2 +- lib/routes/dekudeals/index.js | 2 +- lib/routes/dgtle/keyword.js | 2 +- lib/routes/dgtle/trade.js | 2 +- lib/routes/dilbert/strip.js | 2 +- lib/routes/dilidili/fanju.js | 2 +- lib/routes/douban/book/rank.js | 2 +- lib/routes/douban/bookstore.js | 4 ++-- lib/routes/douban/commercialpress/latest.js | 2 +- lib/routes/douban/event/hot.js | 2 +- lib/routes/douban/explore.js | 2 +- lib/routes/douban/group.js | 2 +- lib/routes/douban/later.js | 2 +- lib/routes/douban/latest_music.js | 2 +- lib/routes/douban/people/status.js | 4 ++-- lib/routes/douban/playing.js | 2 +- lib/routes/douban/topic.js | 2 +- lib/routes/douban/ustop.js | 2 +- lib/routes/douyin/utils.js | 2 +- lib/routes/dribbble/utils.js | 2 +- lib/routes/dsndsht23/index.js | 2 +- lib/routes/dsndsht23/pictures.js | 4 ++-- lib/routes/eastday/sh.js | 2 +- lib/routes/facebook/page.js | 2 +- lib/routes/ff14/ff14_zh.js | 2 +- lib/routes/ft/utils.js | 2 +- lib/routes/galgame/sayhuahuo.js | 2 +- lib/routes/gaoqingla/latest.js | 2 +- lib/routes/github/follower.js | 2 +- lib/routes/github/star.js | 2 +- lib/routes/gnn/gnn.js | 2 +- lib/routes/google/doodles.js | 2 +- lib/routes/gouhuo/index.js | 2 +- lib/routes/gouhuo/strategy.js | 2 +- lib/routes/gracg/user.js | 2 +- lib/routes/guardian/utils.js | 4 ++-- lib/routes/guokr/scientific.js | 2 +- lib/routes/hanime/video.js | 4 ++-- lib/routes/hpoi/index.js | 2 +- lib/routes/icourse163/newest.js | 2 +- lib/routes/imuseum/index.js | 2 +- lib/routes/instagram/tag.js | 2 +- lib/routes/instagram/user.js | 2 +- lib/routes/iqiyi/dongman.js | 2 +- lib/routes/iqiyi/video.js | 2 +- lib/routes/itjuzi/invest.js | 2 +- lib/routes/itjuzi/merge.js | 2 +- lib/routes/jandan/pic.js | 2 +- lib/routes/javbus/util.js | 4 ++-- lib/routes/jingdong/zhongchou.js | 2 +- lib/routes/juejin/books.js | 2 +- lib/routes/juejin/pins.js | 2 +- lib/routes/keep/user.js | 2 +- lib/routes/kirara/news.js | 2 +- lib/routes/konachan/post_popular_recent.js | 2 +- lib/routes/laosiji/feed.js | 2 +- lib/routes/laosiji/hot.js | 2 +- lib/routes/laosiji/hotshow.js | 2 +- lib/routes/leboncoin/ad.js | 4 ++-- lib/routes/leetcode/check-cn.js | 3 +-- lib/routes/leetcode/check-us.js | 2 +- lib/routes/lolapp/recommend.js | 2 +- lib/routes/mafengwo/note.js | 2 +- lib/routes/manhuagui/comic.js | 2 +- lib/routes/maoyan/hot.js | 2 +- lib/routes/maoyan/upcoming.js | 2 +- lib/routes/meipai/utils.js | 2 +- lib/routes/metred/fuli.js | 2 +- lib/routes/mi/crowdfunding.js | 2 +- lib/routes/mi/youpin/utils.js | 2 +- lib/routes/miniapp/store/newest.js | 4 ++-- lib/routes/mzitu/post.js | 2 +- lib/routes/mzitu/util.js | 2 +- lib/routes/natgeo/dailyphoto.js | 2 +- lib/routes/nba/app_news.js | 2 +- lib/routes/ncm/artist.js | 2 +- lib/routes/ncm/djradio.js | 2 +- lib/routes/ncm/playlist.js | 2 +- lib/routes/ncm/userplaylist.js | 2 +- lib/routes/nga/forum.js | 2 +- lib/routes/nga/post.js | 2 +- lib/routes/nhentai/util.js | 4 ++-- lib/routes/nhk/news_web_easy.js | 2 +- lib/routes/nintendo/direct.js | 2 +- lib/routes/nintendo/eshop_hk.js | 6 +++--- lib/routes/nintendo/eshop_jp.js | 2 +- lib/routes/nintendo/eshop_us.js | 4 +--- lib/routes/nintendo/utils.js | 2 +- lib/routes/pigtails/index.js | 2 +- lib/routes/pixiv/bookmarks.js | 4 ++-- lib/routes/pixiv/ranking.js | 4 ++-- lib/routes/pixiv/search.js | 4 ++-- lib/routes/pixiv/user.js | 4 ++-- lib/routes/qdaily/notch/explore.js | 4 ++-- lib/routes/qidian/free-next.js | 2 +- lib/routes/qidian/free.js | 2 +- lib/routes/rs05/rs05.js | 2 +- lib/routes/shuhui/comics.js | 2 +- lib/routes/smzdm/keyword.js | 2 +- lib/routes/smzdm/ranking.js | 2 +- lib/routes/sogou/doodles.js | 2 +- lib/routes/sspai/topics.js | 2 +- lib/routes/t66y/index.js | 4 ++-- lib/routes/t66y/post.js | 4 ++-- lib/routes/tanwu/products.js | 2 +- lib/routes/taobao/zhongchou.js | 2 +- lib/routes/telegram/channel.js | 2 +- lib/routes/telegram/stickerpack.js | 2 +- lib/routes/tencent/tucaoqq/post.js | 2 +- lib/routes/the-economist/gre-vocabulary.js | 2 +- lib/routes/tieba/forum.js | 2 +- lib/routes/titsguru/util.js | 2 +- lib/routes/twitter/utils.js | 4 ++-- lib/routes/universities/nuaa/jwc/jwc.js | 2 +- lib/routes/universities/nuaa/yjsy/yjsy.js | 2 +- lib/routes/verge/index.js | 4 ++-- lib/routes/vol/lastupdate.js | 2 +- lib/routes/weibo/utils.js | 2 +- lib/routes/weidian/goods.js | 2 +- lib/routes/weseepro/circle.js | 2 +- lib/routes/weseepro/newest-direct.js | 4 ++-- lib/routes/weseepro/newest.js | 4 ++-- lib/routes/westore/new.js | 2 +- lib/routes/wired/tag.js | 2 +- lib/routes/xiachufang/utils.js | 2 +- lib/routes/xiaoheihe/discount.js | 5 +++-- lib/routes/yande.re/post_popular_recent.js | 2 +- lib/routes/youku/channel.js | 2 +- lib/routes/youtube/channel.js | 2 +- lib/routes/youtube/playlist.js | 2 +- lib/routes/youtube/user.js | 2 +- lib/routes/youzan/goods.js | 2 +- lib/routes/yxdzqb/index.js | 2 +- lib/routes/zhihu/activities.js | 4 ++-- lib/routes/zhihu/bookstore/newest.js | 2 +- lib/routes/zhihu/pin/utils.js | 4 ++-- lib/routes/zhihu/zhuanlan.js | 2 +- lib/routes/ziroom/room.js | 2 +- 181 files changed, 213 insertions(+), 220 deletions(-) diff --git a/docs/en/joinus/README.md b/docs/en/joinus/README.md index 14fceb379..da1fb8d2d 100644 --- a/docs/en/joinus/README.md +++ b/docs/en/joinus/README.md @@ -73,7 +73,7 @@ Firstly, add a .js file for the new route in [/lib/router.js](https://github.com // the article title title: item.title, // the article content - description: `${item.desc}
`, + description: `${item.desc}
`, // the article publish time pubDate: new Date(item.time * 1000).toUTCString(), // the article link diff --git a/docs/joinus/README.md b/docs/joinus/README.md index 09f5d11a1..bcb9c875e 100644 --- a/docs/joinus/README.md +++ b/docs/joinus/README.md @@ -82,7 +82,7 @@ sidebar: auto // 文章标题 title: item.title, // 文章正文 - description: `${item.desc}
`, + description: `${item.desc}
`, // 文章发布时间 pubDate: new Date(item.time * 1000).toUTCString(), // 文章链接 @@ -141,7 +141,7 @@ sidebar: auto description: `作者:${item .find('.usr-pic a') .last() - .text()}
描述:${item.find('.content p').text()}
`, + .text()}
描述:${item.find('.content p').text()}
`, link: item.find('.title a').attr('href'), }; }) diff --git a/lib/routes/005tv/zx.js b/lib/routes/005tv/zx.js index eb77800de..92af482e8 100644 --- a/lib/routes/005tv/zx.js +++ b/lib/routes/005tv/zx.js @@ -17,7 +17,7 @@ module.exports = async (ctx) => { .find('h3 > a') .text() .trim(), - description: `
${$(item) diff --git a/lib/routes/9to5/utils.js b/lib/routes/9to5/utils.js index a068aa573..ab4f78461 100644 --- a/lib/routes/9to5/utils.js +++ b/lib/routes/9to5/utils.js @@ -6,7 +6,7 @@ const ProcessFeed = (data) => { const cover = $('meta[property="og:image"]'); if (cover.length > 0) { - $(``).insertBefore(content[0].firstChild); + $(``).insertBefore(content[0].firstChild); } // remove useless DOMs diff --git a/lib/routes/acfun/bangumi.js b/lib/routes/acfun/bangumi.js index 019dab4ed..673969100 100644 --- a/lib/routes/acfun/bangumi.js +++ b/lib/routes/acfun/bangumi.js @@ -33,7 +33,7 @@ module.exports = async (ctx) => { return { title: `${video.episodeName}-${video.newTitle}`, - description: ``, + description: ``, link: `http://www.acfun.cn/bangumi/ab${id}_${video.groupId}_${video.id}`, pubDate: new Date(video.onlineTime).toUTCString(), }; diff --git a/lib/routes/acfun/video.js b/lib/routes/acfun/video.js index cb99e0b26..fd4a707f3 100644 --- a/lib/routes/acfun/video.js +++ b/lib/routes/acfun/video.js @@ -34,7 +34,7 @@ module.exports = async (ctx) => { return { title: itemTitle, - description: ``, + description: ``, link: host + itemUrl, pubDate: new Date(itemDate).toUTCString(), }; diff --git a/lib/routes/anigamer/anime.js b/lib/routes/anigamer/anime.js index 437b69a81..a601f7365 100644 --- a/lib/routes/anigamer/anime.js +++ b/lib/routes/anigamer/anime.js @@ -5,7 +5,7 @@ module.exports = async (ctx) => { ctx.state.data = { title: anime.title, link: `https://ani.gamer.com.tw/animeRef.php?sn=${anime.anime_sn}`, - description: ` ` + anime.content.trim(), + description: ` ` + anime.content.trim(), item: anime.volumes[0].map((item) => ({ title: `${anime.title} 第 ${item.volume} 集`, link: `https://ani.gamer.com.tw/animeVideo.php?sn=${item.video_sn}`, diff --git a/lib/routes/animen/news.js b/lib/routes/animen/news.js index 6c17188f5..d95fef328 100644 --- a/lib/routes/animen/news.js +++ b/lib/routes/animen/news.js @@ -59,7 +59,7 @@ module.exports = async (ctx) => { description = detail.content; } else { const image = detail.p_original_path; - description = `

`; + description = `

`; } return description; }); diff --git a/lib/routes/apkpure/versions.js b/lib/routes/apkpure/versions.js index ba2cdf14c..4e74c9ad0 100644 --- a/lib/routes/apkpure/versions.js +++ b/lib/routes/apkpure/versions.js @@ -13,7 +13,7 @@ module.exports = async (ctx) => { img.searchParams.delete('w'); // get full resolution icon ctx.state.data = { title: $('.ver-top-h1').text(), - description: ` ` + $('.ver-top-title>h2').text(), + description: ` ` + $('.ver-top-title>h2').text(), link: decodeURI(link), item: $('.ver li') .toArray() diff --git a/lib/routes/apple/appstore/gofans.js b/lib/routes/apple/appstore/gofans.js index 208aba672..022d41171 100644 --- a/lib/routes/apple/appstore/gofans.js +++ b/lib/routes/apple/appstore/gofans.js @@ -19,7 +19,7 @@ module.exports = async (ctx) => { item: response.data.data.map((item) => ({ title: `「${item.price === '0.00' ? '免费' : '降价'}」-「${item.kind === '1' ? 'macOS' : 'iOS'}」${item.name}`, description: ` - +
原价:¥${item.original_price} -> 现价:¥${item.price}
diff --git a/lib/routes/apple/appstore/xianmian.js b/lib/routes/apple/appstore/xianmian.js index 46ed82980..8e3d4ad9e 100644 --- a/lib/routes/apple/appstore/xianmian.js +++ b/lib/routes/apple/appstore/xianmian.js @@ -12,7 +12,7 @@ module.exports = async (ctx) => { item: data.map((item) => ({ title: `「${item.discount_info[0].discounted_price === '0.00' ? '免费' : '降价'}」${item.app.name}`, description: ` - +
原价:¥${item.discount_info[0].original_price} -> 现价:¥${item.discount_info[0].discounted_price}
diff --git a/lib/routes/aptonic/action.js b/lib/routes/aptonic/action.js index 93f94b97f..c93a3a739 100644 --- a/lib/routes/aptonic/action.js +++ b/lib/routes/aptonic/action.js @@ -18,7 +18,7 @@ module.exports = async (ctx) => { return { title: item.find('h2').text(), description: ` - +
${$(item.find('td')[1]) .children() diff --git a/lib/routes/aqicn/index.js b/lib/routes/aqicn/index.js index f28cac8dd..a2f543a0c 100644 --- a/lib/routes/aqicn/index.js +++ b/lib/routes/aqicn/index.js @@ -17,7 +17,7 @@ module.exports = async (ctx) => { item: [ { title: `${data.namena}实时空气质量(AQI)${data.utimecn}`, - description: `${data.infocn}
风力:${data.cwind[0]}
AQI:${data.aqi}
`, + description: `${data.infocn}
风力:${data.cwind[0]}
AQI:${data.aqi}
`, pubDate: new Date(data.time * 1000).toUTCString(), guid: data.time, link: `https://aqicn.org/city/${data.ids.path}`, diff --git a/lib/routes/atfd/index.js b/lib/routes/atfd/index.js index 00a7ae821..bd937c59a 100644 --- a/lib/routes/atfd/index.js +++ b/lib/routes/atfd/index.js @@ -37,7 +37,7 @@ module.exports = async (ctx) => { description: 'All the Flight Deals', item: data.map((item) => ({ title: `[${item.dateRanges[0] ? dayjs(item.dateRanges[0].start).format('YYYY MMM DD') + ' to ' + dayjs(item.dateRanges[0].end).format('YYYY MMM DD') : ''}] ${item.title}`, - description: `${item.cityPairs[0].destination.city},${item.cityPairs[0].destination.countryName}
FromToPrice
${item.cityPairs[0].origin.iata}, ${item.cityPairs[0].origin.city}, ${item.cityPairs[0].origin.countryName}${item.cityPairs[0].destination.iata}, ${item.cityPairs[0].destination.city}, ${item.cityPairs[0].destination.countryName}${item.currency} ${item.price}
`, + description: `${item.cityPairs[0].destination.city},${item.cityPairs[0].destination.countryName}
FromToPrice
${item.cityPairs[0].origin.iata}, ${item.cityPairs[0].origin.city}, ${item.cityPairs[0].origin.countryName}${item.cityPairs[0].destination.iata}, ${item.cityPairs[0].destination.city}, ${item.cityPairs[0].destination.countryName}${item.currency} ${item.price}
`, pubDate: new Date(item.createdAt), guid: item.id, link: item.url, diff --git a/lib/routes/autotrader/index.js b/lib/routes/autotrader/index.js index e0978b191..b23a0e0c8 100644 --- a/lib/routes/autotrader/index.js +++ b/lib/routes/autotrader/index.js @@ -49,7 +49,7 @@ module.exports = async (ctx) => { let images = ''; $('.fpa-image-overlay img').each((i, e) => { - images += `
`; + images += `
`; }); const description = keyFacts + images + $('meta[name="og:description"]').attr('content'); diff --git a/lib/routes/baidu/doodles.js b/lib/routes/baidu/doodles.js index 779e600dc..38be4f9a5 100644 --- a/lib/routes/baidu/doodles.js +++ b/lib/routes/baidu/doodles.js @@ -18,7 +18,7 @@ module.exports = async (ctx) => { return { title: `${item.find('.title').text()}-${item.find('.date').text()}`, - description: ``, + description: ``, link: item.find('.more a').attr('href'), }; }) diff --git a/lib/routes/bangumi/calendar/today.js b/lib/routes/bangumi/calendar/today.js index e3e0ef805..bc602f6dd 100644 --- a/lib/routes/bangumi/calendar/today.js +++ b/lib/routes/bangumi/calendar/today.js @@ -38,7 +38,7 @@ module.exports = async (ctx) => { const link = `http://bangumi.tv/subject/${bgm.bgm_id}`; const id = `${link}#${new Intl.DateTimeFormat('zh-CN').format(updated)}`; - const image = ``; + const image = ``; const html = image + '