No worries. I wrote it and fixing it because gelbooru is changing its website is really not a big deal. I rather have to thank you for posting the error and so on. Helped a lot with fixing it :)
Should be working now with this script: https://pastebin.com/K1ae96KX