Skip to content

Adding Resource file extension Filter for web#67

Open
IryNeko wants to merge 6 commits intodeepghs:mainfrom
IryNeko:main
Open

Adding Resource file extension Filter for web#67
IryNeko wants to merge 6 commits intodeepghs:mainfrom
IryNeko:main

Conversation

@IryNeko
Copy link

@IryNeko IryNeko commented Oct 10, 2024

Added a small snippet that specify which resource file extension to collect and discard the rest

source = DanbooruSource(['water'])
source.file_ext_filter=['jpg']

the switch is by default not enabled and not performing any action
unless the user created the tag filter after init
May cause too many request, it will send request too frequently if there's not enough density of the resource with filtered extension.
It also makes the number of resource calculation behave weird.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant