From 863e76a91c98f8858a57d4f1c65c1b9f9438f3d6 Mon Sep 17 00:00:00 2001 From: daniel <861397272@qq.com> Date: Sat, 14 Dec 2024 19:11:35 +0800 Subject: [PATCH] =?UTF-8?q?feat(route/missav):=20=E4=BF=AE=E5=A4=8Dmissav?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E8=AE=BF=E9=97=AE=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/missav/new.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/routes/missav/new.ts b/lib/routes/missav/new.ts index d9e720deee3b5d8..c0a60e7f3e515b8 100644 --- a/lib/routes/missav/new.ts +++ b/lib/routes/missav/new.ts @@ -2,10 +2,11 @@ import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); -import got from '@/utils/got'; import { load } from 'cheerio'; import { art } from '@/utils/render'; import path from 'node:path'; +import puppeteer from '@/utils/puppeteer'; +import { puppeteerGet } from '@/routes/aip/utils'; export const route: Route = { path: '/new', @@ -33,9 +34,9 @@ export const route: Route = { async function handler() { const baseUrl = 'https://missav.com'; - const { data: response } = await got(`${baseUrl}/dm397/new`); + const browser = await puppeteer(); + const response = await puppeteerGet(`${baseUrl}/dm397/new`, browser); const $ = load(response); - const items = $('.grid .group') .toArray() .map((item) => {