mirror of
https://git.stupid.fish/teidesu/scripts.git
synced 2025-07-28 02:32:11 +10:00
chore: update public repo
This commit is contained in:
parent
090a502ece
commit
67a6238632
2 changed files with 142 additions and 19 deletions
|
@ -6,6 +6,7 @@ import { ffetchZodAdapter } from '@fuman/fetch/zod'
|
|||
import { webReadableToFuman, write } from '@fuman/io'
|
||||
import { nodeWritableToFuman } from '@fuman/node'
|
||||
import { type CheerioAPI, load } from 'cheerio'
|
||||
import { ProxyAgent } from 'undici'
|
||||
|
||||
const cheerioAddon: FfetchAddon<object, { cheerio: () => Promise<CheerioAPI> }> = {
|
||||
response: {
|
||||
|
@ -23,6 +24,9 @@ export const ffetch = ffetchBase.extend({
|
|||
cheerioAddon,
|
||||
toughCookieAddon(),
|
||||
],
|
||||
extra: {
|
||||
dispatcher: process.env.http_proxy ? new ProxyAgent(process.env.http_proxy) : undefined,
|
||||
} as any,
|
||||
})
|
||||
|
||||
export async function downloadStream(stream: ReadableStream, path: string) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue