1
Fork 0

*-allthefallen: download soft-deleted posts

This commit is contained in:
Conduitry 2025-02-27 07:14:47 -05:00
parent 02ea5c7ee3
commit 8c72323de1

View file

@ -2,7 +2,7 @@ import { fetch_retry } from '../fetch.js';
export async function* get_files(query) {
for (let page = 1, posts; !posts || posts.length === 100; page++) {
posts = await (await fetch_retry(`https://booru.allthefallen.moe/posts.json?limit=100&page=${page}&tags=${encodeURIComponent(query)}`)).json();
posts = await (await fetch_retry(`https://booru.allthefallen.moe/posts.json?limit=100&page=${page}&tags=${encodeURIComponent(query + ' status:any')}`)).json();
for (const post of posts) {
yield { url: post.file_url, filename: `${post.id}-${post.md5}.${post.media_asset.file_ext}`, tags: post.tag_string.split(' '), mtime: post.created_at };
}