Nandaka / DanbooruDownloader

*booru image downloader
http://nandaka.devnull.zone/
392 stars 38 forks source link

Please help / advise - "Unhandled exception" for Rule34hentai.net #200

Open spidernope opened 4 years ago

spidernope commented 4 years ago

@Nandaka - Can you remove all the other posts from this thread. Then people will only see this post with my step-by-step guide.

Forenote: I use Microsoft Edge (chromium based) browser to extract my cookie string. My regular browser is Firefox. I only used Edge because it was easier to fully extract the entire cookie string. I tested Chrome but the cookie string seemed incomplete.

DanbooruDownloader changes: If you are using the newest version, the program will ask you to input your cookie string for rule34hentai.net at launch. This pop-up can be disabled, I will explain how in the step by step guide.

Step by step guide (2022 edition, no more script editing!):

  1. Download Edge from https://www.microsoft.com/en-us/edge
  2. Go to rule34hentai.net
  3. Wait for the CloudFlare check to complete
  4. Login with your account
  5. Browse to the main page https://rule34hentai.net/post/list
  6. Press "F12" to enable developer mode and click on the tab "Network"
  7. Press “Crtl + R” to load website data
  8. Click on the “Type” column to sort all the data
  9. Click on "List" in the "Name" column
  10. Under “Request Headers” copy the "cookie" and "user-agent" to a notepad
  11. Open DanbooruDownloader (if you are opening the program for the first time. It will ask you two things: -a cookie string for rule34hentai.net, which you can input or ignore -download tags, I suggest you select Yandre
  12. Click on "Edit" on the "main" tab
  13. In the new window select rule34hentai.net from the "provider" drop down menu
  14. Copy/Paste the entire "cookie" string into the field next to "UserName"
  15. Next to "LoginType" you can select either of two options: "Cookie" or "CookieAlwaysAsk" -CookieAlwaysAsk = gives the pop-up when you launch the program -Cookie = gives no popup when you launch the program
  16. Click on "Save" followed by "OK"
  17. Click on "Settings" tab
  18. Copy/Paste the entire "user-agents" string into the field next to "User Agents"
  19. Click on "Save"

Remember: -The CloudFlare check creates a session, this session is valid for 15min max -Update the User-Agents string often, as browsers are updated constantly

Nandaka commented 4 years ago

yep, checked the data retrieved from the url and it returns cloudflare page.

Nandaka commented 4 years ago

You can try this:

  1. Open the website using browser (I'm using Vivaldi), ensure the Cloudflare check is completed, and then get the cookie value from Developer Tools by pressing F12 and navigate to Network tab (you might need to refresh the page).
  2. Copy the cookie value and user agent. image
  3. Using Notepad, edit the DanbooruProviderList.xml and paste the whole cookie value to the Username section. Ensure the LoginType = Cookie. image
  4. Using Notepad, edit DanbooruDownloader3.exe.config and update the user agent based on your browser value. image
  5. Open the application and check if it can get the list. image
Nandaka commented 4 years ago

You need to be logged in to the site. This is the page that I use on that page: https://rule34hentai.net/index.php?q=/rss/images/3D/1

azzxxa commented 4 years ago

i tryed but can't work what should i do?

ghost commented 4 years ago

@spidernope yes please, on Firefox here

ghost commented 4 years ago

I installed Vivaldi, did the same as @Nandaka, but I am getting crashes when I select the website in "Provider" and search for a tag. https://pastebin.com/mcFtTMHn

Nandaka commented 4 years ago

most likely you paste the cookie value incorrectly in DanbooruProviderList.xml, make sure you copy the whole value and ensure the closing bracket is not accidentaly deleted in the xml.

ghost commented 4 years ago

I think it's because I don't have log4net and HtmlAgilityPack installed. Do you have a download link for log4net 1.2.11 (newkey) and HtmlAgilityPack because I can only find the download link for 2.0.8 on logging.apache.org and I don't know how to install HtmlAgilityPack from nuget.org. Windows 10 here btw

ghost commented 4 years ago

I'm getting this error when I search for something https://i.imgur.com/3ld2DaO.png

ghost commented 4 years ago

I don't have log4net 1.2.11 and HtmlAgilityPack. Did you install those packages, and how? I can't find it on the log4net's website and I don't know how to install HtmlAgilityPack because they don't have an option for Windows

Nandaka commented 4 years ago

log4net: https://logging.apache.org/log4net/download_log4net.cgi get the latest version should be ok. HtmlAgilityPack: https://www.nuget.org/packages/HtmlAgilityPack/ use nuget to install the package from your visual studio.

lee27 commented 4 years ago

sorry but I don't know what this cloudflare is

kyummii commented 1 year ago

Thank you very much :))