Skip to content

Commit

Permalink
feat(route/missav): 修复missav不能访问的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
dddaniel1 committed Dec 14, 2024
1 parent 6c21fc3 commit 863e76a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/routes/missav/new.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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) => {
Expand Down

0 comments on commit 863e76a

Please sign in to comment.