-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REQ: Allow custom Board server / URL #6
Comments
I've been thinking about adding some sort of custom server functionality and I found your idea quite interesting and I liked the concept of doing it in a config file-like structure. |
I would be glad to see it happen for sure, this tool has already become my favourite grabber, So cheers for the great app. |
Things are progressing on the |
I finished something that works. Now it only needs some testing and a lot of cleanup. The config file for the custom servers is located at wherever the var |
I've tested it and a couple things,
I also tried xbooru on the off chance that it would work but predictably it didn't since it uses Gelbooru Beta 0.2.0 and gelbooru is allergic to a semi-stable API, and it want's format!(
"https://img.xbooru.com//images//{}/{}",
post["directory"].as_str().unwrap(),
post["image"].as_str().unwrap().to_string()
) I wonder if something like below would be suitable, it would at least work for the stuff that is exposed by json hopefully [servers.xbooru]
pretty_name = "xbooru"
server = "gelbooru"
base_url = "https://xbooru.com/"
post_url = "https://xbooru.com/index.php?page=dapi&s=post&q=index&json=1"
post_list_url = "https://xbooru.com/index.php?page=dapi&s=post&q=index&json=1"
max_post_limit = 100
image_url = "https://img.xbooru.com//images//{}/{}"
image_args = [ "directory", "image" ] EDIT: this is more or less the same syntax as what you have for realbooru, but a bit more flexible since you don't need to specify md5 and ext seperately |
I managed to fix the rule34 error. It was easy enough to just place it along with the other query parameters (idk why I formatted that with text before passing to reqwest). As for realbooru and your test for xbooru, yeah, those two use the same very old and archaic API, and realbooru originally had a small hack to work. Realbooru might still not work (bc I forgot to change the server type inside the code 😅), but on the custom server, you may try using the server |
I wasn't able to take a look at the the latest changes but im getting this error |
Sort of is. It is pulling from realbooru, but since it's running without a beta 0.2 quirk (by using |
ah yeah, I get what you mean now, I made a realbooru custom server and it worked, I had tried the xbooru before. |
Great! Now that the main stuff is working, I will tackle the full cleanup of the code and patching some other bugs. Whatever happens, you may run the app with |
Since there are a lot of image boards around but most of them share the same board software as others, it would be really nice if we could do something like
imageboard_downloader -s moebooru -i https://yande.re ...
this would help a lot instead of needing to hard code many sites that may not be popular.as for custom syntax, maybe regex?
Instead of hoping it works out well, perhaps a config file might be better and more flexible?
The text was updated successfully, but these errors were encountered: