Linaqruf / kohya-trainer

Adapted from https://note.com/kohya_ss/n/nbf7ce8d80f29 for easier cloning
Apache License 2.0
1.85k stars 307 forks source link

[Request] Add Safebooru to booruscraper #77

Closed AnANTKA closed 1 year ago

AnANTKA commented 1 year ago

2lines of code

elif booru.lower() == "safebooru":
  !gallery-dl "https://safebooru.org/index.php?page=post&s=list&tags={tags}" {write_tags} -D {train_data_dir}

It would be great if you add this so I don't have to every time I want to scrape it lol

Linaqruf commented 1 year ago

Added safebooru to image scraper, I'm closing this issue, feel free to open this issue again

if booru == "Danbooru":
  url = "https://danbooru.donmai.us/posts?tags={}".format(tags)
elif booru == "Gelbooru":
  url = "https://gelbooru.com/index.php?page=post&s=list&tags={}".format(tags)
else:
  url = "https://safebooru.org/index.php?page=post&s=list&tags={}".format(tags)