Skip to content

blue-ribbon-nearby: rebrowser-playwright 기반 브라우저 fallback 추가#94

Open
greekr4 wants to merge 2 commits intoNomaDamas:mainfrom
greekr4:feat/blue-ribbon-browser-fallback
Open

blue-ribbon-nearby: rebrowser-playwright 기반 브라우저 fallback 추가#94
greekr4 wants to merge 2 commits intoNomaDamas:mainfrom
greekr4:feat/blue-ribbon-browser-fallback

Conversation

@greekr4
Copy link
Copy Markdown

@greekr4 greekr4 commented Apr 9, 2026

요약

bluer.co.kr의 자동화 차단(403)을 우회하기 위해 rebrowser-playwright 기반 브라우저 fallback을 blue-ribbon-nearby 패키지에 추가했습니다.

배경

현재 README에 블루리본 스킬이 지원 중단으로 표시되어 있습니다:

브라우저·curl·Playwright·TLS impersonation 등 가능한 우회를 모두 검증했지만 nginx 단에서 403이 반환

기존 Playwright는 navigator.webdriver = true, HeadlessChrome UA, SwiftShader WebGL 등으로 봇으로 탐지됩니다. rebrowser-playwright는 Chromium 바이너리 레벨에서 이를 패치하고, 추가 stealth 패치(plugins, languages, permissions 등)를 적용하면 HTTP 200으로 정상 접근됩니다.

변경 내용

새 파일

  • packages/blue-ribbon-nearby/src/browser-fallback.js — stealth 패치가 적용된 브라우저 모듈

수정 파일

  • packages/blue-ribbon-nearby/src/index.jsfetchZoneCatalog, fetchNearbyMap에서 403 응답 시 자동 fallback
  • packages/blue-ribbon-nearby/package.jsonrebrowser-playwrightoptionalDependencies로 추가
  • blue-ribbon-nearby/SKILL.md — 브라우저 fallback 사용법 안내 추가

동작 방식

기존 fetch → 200 OK → 그대로 사용 (변경 없음)
기존 fetch → 403    → rebrowser-playwright 설치됨? → 브라우저 fallback
                    → 미설치?                      → 기존처럼 403 에러
  • rebrowser-playwright 미설치 시 기존 동작과 완전히 동일
  • 별도 설정/플래그 없이 403 발생 + 패키지 설치 여부만으로 자동 전환

stealth 패치 (8개)

패치 대상
navigator.webdriver 제거 모든 봇 탐지기
chrome.runtime 객체 Cloudflare
navigator.plugins (3개) Cloudflare Bot Management
navigator.languages Akamai (HTTP 헤더 교차검증)
Permissions API 정규화 PerimeterX
hardwareConcurrency / deviceMemory 고급 핑거프린터
outerWidth / outerHeight 오프셋 headless 탐지
Canvas fingerprint 노이즈 Cloudflare Turnstile

A/B 테스트 결과

A (적용 전)

Image

B (적용 후)

Image

bluer.co.kr 대상 실측 (2026-04-09):

항목 rebrowser-playwright 일반 Playwright
HTTP Status 200 OK 403 Forbidden
navigator.webdriver undefined true
navigator.plugins 3 0
WebGL Apple M2 (실제 GPU) SwiftShader

잠실 지역 블루리본 맛집 225개 목록까지 정상 로딩을 확인했습니다.

제약 사항

  • headed 모드 전용 (디스플레이 환경 필요, CI/서버 부적합)
  • Google Chrome 시스템 설치 필요
  • k-skill-proxy(서버)에는 적용 불가 — 클라이언트 측 fallback만

관련

테스트

npm install rebrowser-playwright  # optional
node --check packages/blue-ribbon-nearby/src/browser-fallback.js  # 문법 확인

greekr4 and others added 2 commits April 9, 2026 13:33
bluer.co.kr이 자동화 접근을 차단(403)할 때,
rebrowser-playwright가 설치되어 있으면 실제 Chrome 브라우저를 통해
자동으로 fallback하여 zone 카탈로그와 nearby 검색을 수행한다.

- browser-fallback.js: stealth 패치 적용 브라우저 모듈 (8개 패치)
- index.js: fetchZoneCatalog/fetchNearbyMap에서 403 시 자동 fallback
- package.json: rebrowser-playwright를 optionalDependencies로 추가
- SKILL.md: 브라우저 fallback 사용법 안내

rebrowser-playwright 미설치 시 기존 동작과 완전히 동일하다.
The browser fallback landed without regenerating package-lock, so npm ci failed immediately. Once the lockfile was synced, the blue-ribbon-nearby direct-API tests also showed that structured 403 domain errors were being retried through Playwright whenever the optional dependency was present.

This commit refreshes the workspace lockfile and restricts browser fallback to unclassified 403 automation blocks so PREMIUM_REQUIRED and other structured upstream errors still surface deterministically.

Constraint: CI runs npm ci from the root lockfile and installs optional dependencies when they are captured there
Rejected: Update tests to stub browser fallback | would hide the incorrect production retry path
Confidence: high
Scope-risk: narrow
Directive: Preserve structured upstream 403 errors from bluer.co.kr; only browser-fallback opaque automation blocks
Tested: npm ci
Tested: npm test --workspace blue-ribbon-nearby (python3.12 first on PATH)
Tested: npm run ci (python3.12 first on PATH)
Not-tested: GitHub Actions rerun on ubuntu after push
@vkehfdl1 vkehfdl1 force-pushed the feat/blue-ribbon-browser-fallback branch from b378d09 to 8f28e44 Compare April 10, 2026 02:54
@vkehfdl1
Copy link
Copy Markdown
Contributor

@greekr4 일단 PR 남겨주셔서 감사합니다. 현재 제가 서빙하고 있는 케이-스킬 용 프록시 서버가 블루리본 측에서 기기 밴을 한 것으로 보입니다. 저는 프리미엄 계정 연 구독으로 11,000원을 케이-스킬 서비스 목적으로 지불했으나 예고 없이 탈퇴 처리 받았으며 지불한 금액에 대해서는 환불받지 못했습니다.

보내주신 PR에 대해서도 검토한 후 직접 실험해 보았으나, 현재 제가 케이-스킬을 서비스 중인 프록시 서버 상에서는 작동하지 않았습니다 (기기밴을 당해서…)

이 PR은 제가 직접 작동 테스트는 못하지만, 리뷰 후에 머지하도록 하겠습니다. 감사합니다.

  • by human Jeffrey Kim

@greekr4
Copy link
Copy Markdown
Author

greekr4 commented Apr 10, 2026

@greekr4 일단 PR 남겨주셔서 감사합니다. 현재 제가 서빙하고 있는 케이-스킬 용 프록시 서버가 블루리본 측에서 기기 밴을 한 것으로 보입니다. 저는 프리미엄 계정 연 구독으로 11,000원을 케이-스킬 서비스 목적으로 지불했으나 예고 없이 탈퇴 처리 받았으며 지불한 금액에 대해서는 환불받지 못했습니다.

보내주신 PR에 대해서도 검토한 후 직접 실험해 보았으나, 현재 제가 케이-스킬을 서비스 중인 프록시 서버 상에서는 작동하지 않았습니다 (기기밴을 당해서…)

이 PR은 제가 직접 작동 테스트는 못하지만, 리뷰 후에 머지하도록 하겠습니다. 감사합니다.

  • by human Jeffrey Kim

@vkehfdl1 넵! 다른 크롤링 부분에도 봇탐지가 되시면 활용해도 좋을 것 같아서 PR 올렸습니다.

그래도 결국 bot이다보니 벤에 대해서 대처를 할 수 없지만...

항상 좋은 기능 감사드립니다.

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.

2 participants