diff --git a/src/general.ts b/src/general.ts index 0a28a3a..2f3f27f 100644 --- a/src/general.ts +++ b/src/general.ts @@ -28,7 +28,7 @@ export default async (url: URL.Url): Promise => { return null; } - const $: client.CheerioStaticEx = res.$; + const $ = res.$; let title = $('meta[property="og:title"]').attr('content') || diff --git a/src/plugins/amazon.ts b/src/plugins/amazon.ts index 5267518..e31a3c9 100644 --- a/src/plugins/amazon.ts +++ b/src/plugins/amazon.ts @@ -23,11 +23,11 @@ export function test(url: URL.Url) { export async function summary(url: URL.Url) { const res = await client.fetch(url.href); - const $: client.CheerioStaticEx = res.$; + const $ = res.$; - const title: string = $('#title').text(); + const title = $('#title').text(); - const description: string = + const description = $('#productDescription').text() || $('meta[name="description"]').attr('content');