Skip to content

Download the Automation Build and enable all captcha types - #24

Merged
4EYES44 merged 2 commits into
mainfrom
feature/auto-download-automation-build
Oct 17, 2026
Merged

4EYES44 merged 2 commits into
mainfrom
feature/auto-download-automation-build

Conversation

@4EYES44

@4EYES44 4EYES44 commented Oct 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • If no Extension Directory is supplied, load() fetches chromium_automation.zip from NopeCHA GitHub releases instead of the Web Store CRX, and re-downloads when manifest["version_name"] differs from the latest tag (or a pinned version=).
  • A user-supplied Extension Directory is never overwritten by a download.
  • Writing the Nopecha Manifest Config now turns on every existing *_auto_solve / *_auto_open flag and enabled, while leaving delay times, selectors, JS/HTML, and the top-level Chrome "key" alone.

Closes #16.

Test plan

  • uv run python -m unittest discover -s tests -v (20 tests)
  • Nopecha(api_key=...) with no extension_path, then load(with_command_line_option=False) and confirm extensions/NopeCHA/manifest.json has the key and captcha types enabled
  • Pass extension_path to an unpacked Automation Build and confirm no GitHub download occurs

Made with Cursor

Users should not have to fetch chromium_automation.zip themselves, and the
Nopecha Manifest Config should turn on every captcha type instead of leaving
solver flags at the zip defaults.

Co-authored-by: Cursor <cursoragent@cursor.com>
@netlify

netlify Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for amralhams ready!

Name Link
🔨 Latest commit 912bd0a
🔍 Latest deploy log https://app.netlify.com/projects/amralhams/deploys/6ad33dd7cac665ae5d15c928
😎 Deploy Preview https://deploy-preview-24--amralhams.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@4EYES44 4EYES44 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Level Count
P0 0
P1 0
P2 1
contested 0

debate-review on 2730937, main cursor, second cursor.

Ship with one non-blocking fix. The PR cleanly implements Automation Build downloading, version-based cache invalidation, user-supplied directory preservation, and automatic enabling of all captcha flags in the Nopecha Manifest Config. No blocking issues remain; the only agreed finding is a minor inconsistency where _cache_is_stale() strips whitespace and a leading v prefix from version while _automation_zip_url() interpolates raw self.version into the GitHub release download URL.

Comment on lines +264 to +267
def _automation_zip_url(self) -> str:
if self.version:
return _AUTOMATION_ZIP_TAG.format(tag=self.version)
return _AUTOMATION_ZIP_LATEST

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

P2, agreed by both reviewers. Passing a v-prefixed or whitespace-padded version string (such as version="v0.6.1", matching manifest["version_name"]) passes the staleness check on a warm cache but fails with HTTP 404 when downloading.

_cache_is_stale() normalizes self._desired_tag() via _normalized_version() (value.strip().lstrip("vV")), so version="v0.6.1" matches a cached manifest["version_name"] of "v0.6.1". However, _automation_zip_url() formats raw self.version directly (if self.version: return _AUTOMATION_ZIP_TAG.format(tag=self.version)), requesting .../releases/download/v0.6.1/chromium_automation.zip, which returns 404 because NopeCHALLC/nopecha-extension release tags omit the v prefix (for example 0.6.1 and 0.6.0), and a whitespace-only version=" " is also truthy and produces a malformed URL.

Suggested: Normalize version with _normalized_version() (and treat blank strings as unset in __init__ or helper methods) before using it in _automation_zip_url() and _desired_tag(), so both cache comparison and download URL construction use the same normalized release tag.

The second pass confirmed that _cache_is_stale() strips v/V and whitespace while _automation_zip_url() interpolates raw self.version into a release URL that expects unprefixed tags, so the non-blocking finding stands.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 912bd0a. _pinned_release_tag() now feeds both _desired_tag() and _automation_zip_url(), so version="v0.6.1" downloads .../download/0.6.1/chromium_automation.zip and a blank/whitespace version is treated as unset (latest).

A v-prefixed or blank version passed the cache check but requested a 404 tag URL.

Co-authored-by: Cursor <cursoragent@cursor.com>
@4EYES44
4EYES44 merged commit 88c0b54 into main Oct 17, 2026
4 of 14 checks passed
@4EYES44
4EYES44 deleted the feature/auto-download-automation-build branch October 17, 2026 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: auto-download chromium_automation.zip from NopeCHA GitHub releases

1 participant