Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

👔 Add newsPress tag #486

Merged
merged 3 commits into from
Sep 28, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion pages/nft/url/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@
}
}
}

Check warning on line 415 in pages/nft/url/index.vue

View workflow job for this annotation

GitHub Actions / ci (ubuntu-latest, 18)

Unexpected console statement
@Watch('url')
reset() {
this.iscnData = null
Expand Down Expand Up @@ -639,10 +639,15 @@
}

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 }
Expand Down Expand Up @@ -745,7 +750,7 @@
}
}
} catch (err) {
logTrackerEvent(this, 'NFTUrlMint', 'SubmitToArweaveError', (err as Error).toString(), 1);

Check warning on line 753 in pages/nft/url/index.vue

View workflow job for this annotation

GitHub Actions / ci (ubuntu-latest, 18)

Unexpected console statement
// eslint-disable-next-line no-console
console.error(err)
throw new Error('CANNOT_SUBMIT_TO_ARWEAVE')
Expand Down Expand Up @@ -803,7 +808,7 @@
}
}
logTrackerEvent(this, 'NFTUrlMint', 'RegisterISCNSuccess', this.iscnId, 1);
this.$router.push(

Check warning on line 811 in pages/nft/url/index.vue

View workflow job for this annotation

GitHub Actions / ci (ubuntu-latest, 18)

Unexpected console statement
this.localeLocation({
name: 'nft-iscn-iscnId',
params: this.iscnParams,
Expand Down
Loading