chore: update public repo

This commit is contained in:
desu-bot 2025-02-19 02:30:26 +00:00
parent c118bcbfc3
commit f02ccb6029
No known key found for this signature in database
12 changed files with 510 additions and 2 deletions

View file

@ -0,0 +1,39 @@
import { ffetch as ffetchBase } from '../../../utils/fetch.ts'
import { rateLimitBypass } from './_very-secret-ratelimit-bypass.ts'
export const ffetchShiki = ffetchBase.extend({
baseUrl: 'https://shikimori.one',
headers: {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36',
'Accept-Language': 'en-US,en;q=0.9',
'Accept-Encoding': 'gzip, deflate, br',
},
retry: {},
...(rateLimitBypass as any),
})
export function counterIter(start = 0, end = Infinity) {
let i = start
let ended = false
const iter: IterableIterator<number> = {
[Symbol.iterator]: () => iter,
next() {
if (ended) {
return { value: undefined, done: true }
}
if (i > end) {
return { value: undefined, done: true }
}
return { value: i++, done: false }
},
}
return {
iter,
end: () => {
ended = true
},
}
}