[PR #421] [CLOSED] fix(nnmclub): handle Cloudflare Turnstile CAPTCHA on login #420

Closed
opened 2026-10-13 19:57:19 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/werwolfby/monitorrent/pull/421
Author: @Nurullaev
Created: 4/19/2026
Status: ❌ Closed

Base: develop ← Head: fix/nnmclub-turnstile-captcha


📝 Commits (1)

  • be75970 fix(nnmclub): handle Cloudflare Turnstile CAPTCHA on login

📊 Changes

1 file changed (+45 additions, -11 deletions)

View changed files

📝 monitorrent/plugins/trackers/nnmclub.py (+45 -11)

📄 Description

What changed

NNMClub added a Cloudflare Turnstile CAPTCHA to their login form (data-sitekey: 0x4AAAAAAAhS8bNcgfb-0Kni, managed mode). The previous requests-based POST login no longer works because the server now requires a cf-turnstile-response token that can only be generated by a real browser.

Solution

Replaced the simple Session.post() login with a Playwright headless browser flow:

  1. Opens the login page in headless Chromium
  2. Fills username and password fields
  3. Waits up to 30 seconds for Turnstile to auto-complete and inject its token into cf-turnstile-response
  4. Submits the form and waits for the redirect away from the login URL
  5. Extracts phpbb2mysql_4_sid and phpbb2mysql_4_data cookies — same session data as before

Playwright (playwright==1.31.1) is already in requirements.txt. No new dependencies needed.

Notes

  • Turnstile in managed mode typically auto-completes without user interaction, even in headless browsers.
  • If running in a Docker environment without browser binaries, playwright install chromium must be run once.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/werwolfby/monitorrent/pull/421 **Author:** [@Nurullaev](https://github.com/Nurullaev) **Created:** 4/19/2026 **Status:** ❌ Closed **Base:** `develop` ← **Head:** `fix/nnmclub-turnstile-captcha` --- ### 📝 Commits (1) - [`be75970`](https://github.com/werwolfby/monitorrent/commit/be75970dca50169853fae860d426f9e7f93e60ac) fix(nnmclub): handle Cloudflare Turnstile CAPTCHA on login ### 📊 Changes **1 file changed** (+45 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `monitorrent/plugins/trackers/nnmclub.py` (+45 -11) </details> ### 📄 Description ## What changed NNMClub added a **Cloudflare Turnstile CAPTCHA** to their login form (`data-sitekey: 0x4AAAAAAAhS8bNcgfb-0Kni`, managed mode). The previous `requests`-based POST login no longer works because the server now requires a `cf-turnstile-response` token that can only be generated by a real browser. ## Solution Replaced the simple `Session.post()` login with a **Playwright headless browser flow**: 1. Opens the login page in headless Chromium 2. Fills username and password fields 3. Waits up to 30 seconds for Turnstile to auto-complete and inject its token into `cf-turnstile-response` 4. Submits the form and waits for the redirect away from the login URL 5. Extracts `phpbb2mysql_4_sid` and `phpbb2mysql_4_data` cookies — same session data as before Playwright (`playwright==1.31.1`) is already in `requirements.txt`. No new dependencies needed. ## Notes - Turnstile in **managed** mode typically auto-completes without user interaction, even in headless browsers. - If running in a Docker environment without browser binaries, `playwright install chromium` must be run once. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-13 19:57:19 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
werwolfby/monitorrent#420
No description provided.