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

ENTER/LEAVE - Error on supported site #4373

Closed
dbz48 opened this issue Jul 31, 2023 · 10 comments
Closed

ENTER/LEAVE - Error on supported site #4373

dbz48 opened this issue Jul 31, 2023 · 10 comments

Comments

@dbz48
Copy link

dbz48 commented Jul 31, 2023

giantessbooru.com has an "enter/leave" message when connecting for the first time on an IP adress (or computer?, so based on cookies)

This site uses shimmie2 and it says this specific website is supported, however GalleryDL can't acess it because of that screen.

The error says it's due to cloudflare:
403 Cloudflare Challenge

@dbz48
Copy link
Author

dbz48 commented Jul 31, 2023

Additionnal info:
[giantessbooru][warning] Cloudflare challenge
[giantessbooru][error] HttpError: '403 Forbidden' for 'https://giantessbooru.com

I tried using the "--cookies-from-browser" argument, sucessfully extracted cookies but same result.

@mikf
Copy link
Owner

mikf commented Aug 1, 2023

The "Enter/Leave" page gets bypassed by setting the required cookie, so that's not the problem.

The Cloudflare challenge page, however, might be a problem if it did not get triggered by your browser. If your browser does have a cf_clearance cookie, use --cookies-from-browser and set --user-agent to the exact same value as your real browser sends.

@mikf mikf added the cloudflare label Aug 1, 2023
@dbz48
Copy link
Author

dbz48 commented Aug 1, 2023

Thanks a lot for the answer! I tried to follow your advice and tried it just now.

Here is the cmd prompt:
gallery-dl.exe --cookies-from-browser firefox --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0" "https://giantessbooru.com/post/list/dress/1"

And here is the error:
[cookies][info] Extracted 2571 cookies from Firefox
[giantessbooru][warning] Cloudflare challenge
[giantessbooru][error] HttpError: '403 Forbidden' for 'https://giantessbooru.com/post/list/dress/1'

I guess I might be doing something wrong in the command firing that.
Thank you again for time and dedication to your tool.

@dbz48
Copy link
Author

dbz48 commented Aug 1, 2023

Note that yes, I does not get triggered on my browser, I tried on two other brand new installed browsers and I only have the ENTER/LEAVE page, not any cloudflare challenge thing, not even a captcha or a waiting page like I saw where there is a wait time to avoid DDOSs.

mikf added a commit that referenced this issue Aug 4, 2023
This does not fix anything Cloudflare related,
just other things caused by a site update.
@mikf
Copy link
Owner

mikf commented Aug 4, 2023

There were a couple of errors due to some site updates which got fixed in f899fac, but I have no idea how to bypass this Cloudflare challenge thing.

edit: Never mind, the site changed yet again ...

You could try different --user-agent strings, -o browser=firefox, using different IPs. Cookies shouldn't matter.

It works for me as long as my User-Agent starts with Mozilla/5.0. Anything else and I also get a Cloudflare challenge.

@dbz48
Copy link
Author

dbz48 commented Aug 4, 2023

In fact the cloudflare challenge is gone, however no matter what the link is, no matter what the tag is, it says there is nothing to download.

gallery-dl.exe --cookies-from-browser firefox --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0" -o browser=firefox "https://giantessbooru.com/post/list/clothed/1"
[cookies][info] Extracted 2564 cookies from Firefox
[giantessbooru][info] No results for https://giantessbooru.com/post/list/clothed/1

I tried a few things:

None of this solved the issue. (I tried putting links with tags that shows the less bizzare stuff from that website, I guess you don't want to see things like that everyday lol)

Thanks again for your time, I'll definetly buy you a cofee for it, and hope we could fix this issue one day.

@dbz48
Copy link
Author

dbz48 commented Aug 4, 2023

Maybe usefull notes :

image
Every image reference has this index thing, and even links seems to work without it

For example:
https://giantessbooru.com/post/list/giantess/index.php?q=/post/view/276198&search=clothed (what you get when clicking on an image)

This same link works by removing some bits:
Without "/post/list/giantess/index.php?q="
https://giantessbooru.com/post/view/276198&search=clothed works

And then removing the &search=clothed also works, I doesn't seem new since amazon does the same thing, so not sure this is useful but I wanted to point it out.

@dbz48
Copy link
Author

dbz48 commented Aug 4, 2023

Very important found!

https://giantessbooru.com/post/list/giantess/index.php?q=/post/view/276198&search=clothed
This results as: No results for [link etc]

But https://giantessbooru.com/post/view/276198 (the cleaned link) works!
Unfortunately what GalleryDL is downloading is a file with a .com naming, and renaming it to .jpg or .png is just an un-usable file.

Cmd prompt for this "sucessfull" result:
gallery-dl.exe --cookies-from-browser firefox --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0" -o browser=firefox "https://giantessbooru.com/post/view/276198"
[cookies][info] Extracted 2566 cookies from Firefox
.\gallery-dl\giantessbooru\giantessbooru_276198.com

Also this link contains no NSFW, just a fully clothed giantess.

mikf added a commit that referenced this issue Aug 10, 2023
too many differences to the other shimmie2 sites
@mikf
Copy link
Owner

mikf commented Aug 10, 2023

Everything should be working again (391a7d7)

This was already supposed to be fixed with f899fac, but the site's HTML was changed a day after I commited this change ...


https://giantessbooru.com/post/list/giantess/index.php?q=/post/view/276198&search=clothed

OK, this URL doesn't really work how you'd expect it to. It only matches https://giantessbooru.com/post/list/giantess and discards the rest, resulting in search results for the giantess tag being downloaded instead of post 276198.

@dbz48
Copy link
Author

dbz48 commented Aug 12, 2023

It works, I guess the webstite really differs from shimmie2 sites then, at least internally because visually it was the same to me.
Thanks for your fix, i'll give a donation as a thanks, have a great day/week!

@dbz48 dbz48 closed this as completed Aug 12, 2023
mikf added a commit that referenced this issue Aug 18, 2023
Do the same thing as for 'realbooru' and override 'posts()'
insteadd of using a separate module.
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