{"id":23739860,"url":"https://github.com/p1atdev/corrugator","last_synced_at":"2026-03-02T16:30:15.805Z","repository":{"id":180738733,"uuid":"665591033","full_name":"p1atdev/corrugator","owner":"p1atdev","description":null,"archived":false,"fork":false,"pushed_at":"2024-01-25T08:10:52.000Z","size":105,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-31T09:39:30.228Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/p1atdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-07-12T14:39:08.000Z","updated_at":"2023-07-12T15:24:13.000Z","dependencies_parsed_at":"2024-01-25T09:30:18.721Z","dependency_job_id":null,"html_url":"https://github.com/p1atdev/corrugator","commit_stats":null,"previous_names":["p1atdev/corrugator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p1atdev%2Fcorrugator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p1atdev%2Fcorrugator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p1atdev%2Fcorrugator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p1atdev%2Fcorrugator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/p1atdev","download_url":"https://codeload.github.com/p1atdev/corrugator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239880903,"owners_count":19712486,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-31T09:39:34.586Z","updated_at":"2026-03-02T16:30:15.731Z","avatar_url":"https://github.com/p1atdev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Danbooru scraping tool\n\nThis tool is under construction, so it may be buggy.\n\n## Setup\n\n```\npip install -r requirements.txt\n```\n\n## Example usages\n\nYou need to write config file to scrape. Yaml file is highly recommended because very readable, but JSON and TOML are also supported.\n\n### Just simple\n\nSearch for `1girl cat_ears score:50..100` up to 20 posts and `1girl cat_ears score:\u003e100` up to 50 posts, and save only images to `./output/cat ears` for the former, save images with captions for the latter.\n\n\n```yaml\nsubsets:\n  - query: \"1girl cat_ears score:50..100\"\n    output_path: \"./output/cat ears/high quality\"\n    limit: 20\n    caption: false\n  - query: \"1girl cat_ears score:\u003e100\"\n    output_path: \"./output/cat ears/best quality\"\n    limit: 50\n    caption: true\n```\n\n```bash\npython ./scrape.py ./example/simple.yaml\n```\n\n### Using query list\n\nSearch for queries in `./example/query_list.txt` and save images up to 50 images for each query. When searching, `filetype:png,jpg,webp` is added to each query.\n\nWhen downloading images, 10 workers are used for multithreaded download. (If not specified, 4 workers are used.)\n\n```yaml\ndomain: \"danbooru.donmai.us\" # or safebooru.donmai.us\n\nsubsets:\n  - query_list_file: \"./example/query_list.txt\"\n    output_path: \"./output/query_list_example\"\n    limit: 50\n\n    caption: false \n\nsearch_filter:\n  filetypes:\n    - png\n    - jpg\n    - webp\n    # - gif\n\nmax_workers: 10\n```\n\n### Post processing\n\nCustomize captions to save.\n\nSearch for `cat_ears` and filter it only includes `solo` and does not include `2girls` and `3girls`, and save up to 50 images.\n\nWhen saving captions, artist tags and copyright tags are not used, character tags, general tags and meta tags are used. However, the `cat ears` tag in general tags will be replaced with `nekomimi`, meta tags will be removed except for the tags specified in `./config/allowed_meta_tags.txt`.\n\n\n```yaml\nsubsets:\n  - query: \"cat_ears\"\n    output_path: \"./output/post_processes\"\n    limit: 50\n\ncaption:\n  artist: false\n  copyright: false\n  character: true\n  general:\n    replaces:\n      - tags: [\"cat ears\"]\n        to: \"nekomimi\"\n  meta:\n    keeps:\n      - tags: \"./config/allowed_meta_tags.txt\" # delete all tags except these tags\n\nsearch_result_filter:\n  include_any: [\"solo\"]\n  exclude_any: [\"2girls\", \"3girls\"]\n\nmax_workers: 4\n```\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp1atdev%2Fcorrugator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fp1atdev%2Fcorrugator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp1atdev%2Fcorrugator/lists"}