deepghs / waifuc

Efficient Train Data Collector for Anime Waifu
https://deepghs.github.io/waifuc/
MIT License
291 stars 25 forks source link

Adding Resource file extension Filter for web #67

Open IryNeko opened 1 month ago

IryNeko commented 1 month ago

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.