From d89d3f21019883218b0a8183b20f96654d77be56 Mon Sep 17 00:00:00 2001 From: AuroraHuang22 Date: Fri, 27 Sep 2024 23:17:01 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=94=20Add=20newsPress=20tag?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/nft/url/index.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pages/nft/url/index.vue b/pages/nft/url/index.vue index 26812550..e987b891 100644 --- a/pages/nft/url/index.vue +++ b/pages/nft/url/index.vue @@ -639,10 +639,15 @@ export default class FetchIndex extends Vue { } async crawlUrlData() { + const isNewsPress = !!this.$route.query.news_press && this.$route.query.news_press !== '0' try { logTrackerEvent(this, 'NFTUrlMint', 'CrawlUrlData', this.url, 1); const { data } = await this.$axios.get(`/crawler/?url=${encodeURIComponent(this.encodedURL)}&wallet=${this.address}`) - const { title, description, keywords, author, body, images = [] } = data + const { title, description, author, body, images = [] } = data; + let {keywords} = data; + if(isNewsPress) { + keywords = keywords ? `${keywords},NewsPress` : 'NewsPress'; + } if (!body) { throw new Error('CANNOT_CRAWL_THIS_URL') } if (title === 'patreon.com' && description === '') { throw new Error('SITE_NOT_CRAWLABLE: pateron') } this.iscnData = { title, description, keywords, author }