diff --git a/lib/routes/ipswdev/index.ts b/lib/routes/ipswdev/index.ts deleted file mode 100644 index 5c566a24e54920..00000000000000 --- a/lib/routes/ipswdev/index.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { Data, Route } from '@/types'; -import got from '@/utils/got'; -import { load } from 'cheerio'; -import { art } from '@/utils/render'; -import path from 'node:path'; - -export const route: Route = { - path: '/index/:productID', - categories: ['program-update'], - example: '/ipswdev/index/iPhone16,1', - parameters: { - productID: 'Product ID', - }, - name: 'Apple latest beta firmware', - maintainers: ['RieN7'], - handler, -}; - -async function handler(ctx) { - const { productID } = ctx.req.param(); - const link = `https://ipsw.dev/product/version/${productID}`; - - const resp = await got({ - method: 'get', - url: link, - headers: { - Referer: host, - }, - }); - - const $ = load(resp.data); - - const productName = $('#IdentifierModal > div > div > div.modal-body > p:nth-child(1) > em').text(); - - const list: Data[] = $('.firmware') - .map((index, element) => { - const ele = $(element); - const version = ele.find('td:nth-child(1) > div > div > strong').text(); - const build = ele.find('td:nth-child(1) > div > div > div > code').text(); - const date = ele.find('td:nth-child(3)').text(); - const size = ele.find('td:nth-child(4)').text(); - return { - title: `${productName} - ${version}`, - link: `https://ipsw.dev/download/${productID}/${build}`, - pubDate: new Date(date).toLocaleDateString(), - guid: build, - description: art(path.join(__dirname, 'templates/description.art'), { - version, - build, - date, - size, - }), - }; - }) - .get(); - - return { - title: `${productName} Released`, - link, - item: list, - }; -} diff --git a/lib/routes/ipswdev/namespace.ts b/lib/routes/ipswdev/namespace.ts deleted file mode 100644 index e6c6cb1ff9b805..00000000000000 --- a/lib/routes/ipswdev/namespace.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Namespace } from '@/types'; - -export const namespace: Namespace = { - name: 'IPSW.dev', - url: 'ipsw.dev', - description: 'Download the latest beta firmware for iPhone, iPad, Mac, Apple Vision Pro, and Apple TV. Check the signing status of the beta firmware.', -}; diff --git a/lib/routes/ipswdev/templates/description.art b/lib/routes/ipswdev/templates/description.art deleted file mode 100644 index c0faef7bfac60d..00000000000000 --- a/lib/routes/ipswdev/templates/description.art +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - -
Version{{ version }}
Build{{ build }}
Released{{ released }}
Size{{ size }}
\ No newline at end of file diff --git a/lib/routes/missav/new.ts b/lib/routes/missav/new.ts index d9e720deee3b5d..c0a60e7f3e515b 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) => {