Skip to content
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

[Zerochan] Tag redirection causes download error #5891

Closed
taskhawk opened this issue Jul 26, 2024 · 4 comments
Closed

[Zerochan] Tag redirection causes download error #5891

taskhawk opened this issue Jul 26, 2024 · 4 comments

Comments

@taskhawk
Copy link

Tag redirections cause an error when trying to download a tag search. For example, the URL:

https://www.zerochan.net/pixiv+id+7411932

redirects to

https://www.zerochan.net/motsuyama+7

This causes the following error:

[zerochan][error] Unable to download data:  JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Testing in the browser, I think the issue is that the endpoint

https://www.zerochan.net/pixiv+id+7411932?json

gets redirected but the ?json parameter gets stripped.

I process a list of artists' tags, that's how I'm running into this error.

@mikf mikf added the site:bug label Jul 26, 2024
mikf added a commit that referenced this issue Jul 26, 2024
@mikf
Copy link
Owner

mikf commented Jul 26, 2024

Should be fixed in 70f18b7

@taskhawk
Copy link
Author

Yup, working fine now. Thanks.

@taskhawk
Copy link
Author

taskhawk commented Aug 7, 2024

Welp, monkey's paw situation here.

After more use turns out Zerochan is really weird about tags and departs from conventions I've encountered in other boorus and boorus-like sites and ends up being detrimental overall, IMO.

Yes, some tags are properly redirected, but there are also some tags that if they are non existent, they redirect to a suggestion that is somewhat similarly spelled but not at all related to the intended tag.

At best, you end up with a few unrelated posts. At worst, the suggestion turns out to be a very common general tag and thousands upon thousands of posts.

One example, the famous Zone artist. Using the zone tag in every other site returns their works as expected, except Danbooru which has them under zone_(artist), but using zone doesn't download anything else. In Zerochan, although they have the tag zone_(artist), using zone doesn't redirect to it but instead to z-one, a character from Yu-Gi-Oh!

I think it would be better to undo the change, or maybe add a config option and let users decide if they want to roll with it, but I no longer consider that wise. Ideally, if a redirection is detected, I think it would be better to stop the run and let the user know of the redirection, present the new URL so they can inspect the results, and if it's indeed what they wanted they can use the new URL to download.

@mikf
Copy link
Owner

mikf commented Aug 10, 2024

It now prints an explicit warning whenever a redirect happens and only follows it when the new redirects option is enabled. (87a14a5)

@mikf mikf closed this as completed Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants