Copying Cloudflare clearance cookies

Some sites use Cloudflare’s browser verification challenge to verify visitors to the website. If you see an error about your connection being blocked by “Cloudflare’s DDoS protection page”, this means that HDoujin Downloader ran into a problem while evaluating the challenge.

After reporting this issue so that it can be fixed, you can use the following workaround to get things working again. In short, you need to copy your user agent and Cloudflare clearance cookies into HDoujin Downloader. The following example uses Google Chrome, and the process might look different for different browsers.

1.) Load the affected webpage in your web browser.

Go to the affected page in your web browser, and let it load. If you see “verifying your browser”, wait for the browser verification test to complete.

2.) Open Developer Tools and refresh the page.

Open Developer Tools in your web browser. In most browsers, you can press F12 or Ctrl+Shift+I to make it appear. This will open a panel at the bottom of the browser window with several tabs. It can also be opened throw the browser menu. Once you’ve opened Developer Tools, go to the “Network” tab.

The following screenshot is from Google Chrome:

While Developer Tools is open, refresh the page. You’ll see the Developer Tools panel fill up with requests.

3.) Copy your browser’s user agent string.

The next step is to copy your browser’s user agent string into HDoujin Downloader. This is the string that your browser uses to identify itself, and the clearance cookies won’t be valid if it doesn’t match.

Click any request, and scroll through the headers until you find your user agent. You will find it on the “Headers” tab, under the “Request Headers” heading:

Copy the string into HDoujin Downloader by going to “File > Options > HTTP”, and pasting the string into the “User Agent String” field:

4.) Copy your Cloudflare clearance cookies.

The last step is copying your Cloudflare clearance cookies from your web browser. The two cookies you need are “cf_clearance and “__cfduid“. You can find these cookies similarly to how you found your user agent string, but instead of the “Headers” tab, go to the “Cookies” tab:

Copy these cookies into HDoujin Downloader by following the instructions here.

After that, you’re good to go! The cookies may expire after period of time, after which you may need to repeat this process.