MCPcopy Create free account

hub / github.com/HarimxChoi/anti_bot_scraper / functions

Functions41 in github.com/HarimxChoi/anti_bot_scraper

↓ 5 callersFunctionparse_kr_money_to_won
한국식 금액 표기를 원(₩) 단위 숫자로 변환합니다. 처리 가능한 형식: - "3억 8,000만원" → 380,000,000 - "8,500" → 85,000,000 (만원 단위로 가정) - "7.5억" → 75
scraper_kr.py:272
↓ 3 callersFunctiondrag_to_latlon
맵을 드래그하여 특정 위도/경도로 이동합니다. 사람처럼 행동하기 위해: - 한 번에 정확히 이동하지 않음 - 여러 번 드래그하여 점진적으로 접근 - 마우스 이동을 20단계로 부드럽게 (steps=20)
scraper_kr.py:188
↓ 3 callersFunctiondrag_to_latlon
Drag map to target coordinates with smooth, human-like movement. Key anti-detection features: - Bézier-like curve via Playwright's s
scraper_eng.py:158
↓ 3 callersFunctionll_to_pixel
위도/경도를 픽셀 좌표로 변환합니다. 메르카토르 투영법 사용: - 구체(지구)를 평면(화면)으로 변환하는 수학 공식 - 정확한 맵 드래그를 위해 필수 이 함수 덕분에 "강남역"이라는 위도/경도를 화면의
scraper_kr.py:111
↓ 3 callersFunctionll_to_pixel
Convert latitude/longitude to pixel coordinates using Mercator projection. This is the same projection used by Google Maps and most web
scraper_eng.py:65
↓ 3 callersFunctionparse_kr_money_to_won
Parse Korean currency format to integer won. Handles complex formats unique to Korean real estate: - "3억 8,000만원" → 380,000,000
scraper_eng.py:359
↓ 3 callersFunctionwheel_to_zoom
마우스 휠로 특정 줌 레벨까지 확대/축소합니다. 사람처럼 행동하기 위해: - 한 번에 확 바꾸지 않고 여러 번 스크롤 - 각 스크롤 사이에 딜레이 - 목표 줌에 도달하면 정지
scraper_kr.py:165
↓ 2 callersFunction_goto
페이지 이동 + 리다이렉트 처리
scraper_kr.py:348
↓ 2 callersFunction_goto
Navigate with fin.land.naver.com redirect handling
scraper_eng.py:461
↓ 2 callersFunctioncrawl_detailed
메인 크롤링 로직 전체 프로세스: 1. 브라우저 실행 (데스크톱 + 모바일) 2. 네이버 부동산 맵 접속 3. 중심 좌표 주변 그리드 스윕 → 단지/매물 마커 수집 4. 매물 많은 단지 우선 방문 → 상
scraper_kr.py:452
↓ 2 callersFunctionget_ms
현재 페이지 URL에서 맵 상태(위도, 경도, 줌 레벨)를 추출합니다. 네이버 지도 URL 형식: ?ms=37.5608,126.9888,15 → 위도 37.5608, 경도 126.9888, 줌 레벨 15 이 정
scraper_kr.py:146
↓ 2 callersFunctionget_ms
Extract current map state (latitude, longitude, zoom) from URL. Naver encodes map state in 'ms' query parameter: "lat,lon,zoom"
scraper_eng.py:286
↓ 2 callersFunctionsetup_blocking
무거운 리소스(이미지, 폰트, 미디어)를 차단합니다. 효과: - 페이지 로딩 속도 2-3배 향상 - 네트워크 대역폭 절약 - 봇 탐지에는 영향 없음 (오히려 자연스러움)
scraper_kr.py:127
↓ 2 callersFunctionwheel_to_zoom
Zoom to target level using mouse wheel with gradual steps. Bots zoom instantly. Humans scroll gradually. Args: target_z
scraper_eng.py:212
↓ 1 callersFunction_build_scenarios
사용자가 선택한 자산 유형(아파트/빌라)에 따라 어떤 API 엔드포인트를 호출할지 결정합니다. APT → /complexes 엔드포인트 VL → /houses 엔드포인트
scraper_kr.py:42
↓ 1 callersFunction_is_villa_article
매물이 빌라/연립인지 판단
scraper_kr.py:553
↓ 1 callersFunction_is_villa_marker
마커가 빌라/연립인지 판단
scraper_kr.py:545
↓ 1 callersFunctionclamp_korea
좌표가 한국 영토 범위를 벗어나지 않도록 제한합니다. 잘못된 좌표 입력 시 자동으로 가장 가까운 한국 내 좌표로 보정합니다.
scraper_kr.py:102
↓ 1 callersFunctioncollect_from
재귀적으로 JSON에서 매물 정보 찾기
scraper_kr.py:644
↓ 1 callersFunctionfetch_one
하나의 매물에 대한 상세 정보를 가져옵니다. 프로세스: 1. 매매가 파싱 2. 워커 탭 할당 받기 3. 상세 페이지 스크래핑
scraper_kr.py:812
↓ 1 callersFunctiongrab
정규식으로 텍스트에서 패턴 추출
scraper_kr.py:376
↓ 1 callersFunctiongrab
Regex helper for text extraction
scraper_eng.py:490
↓ 1 callersFunctiongrid_sweep
중심 좌표 주변을 그리드 패턴으로 스캔합니다. 왜 필요한가? - 한 번에 보이는 맵 영역은 제한적 - 주변 지역까지 체계적으로 스캔해야 매물 누락 방지 - 위/아래 행만 스캔하여 봇처럼 보이지 않게 함
scraper_kr.py:71
↓ 1 callersFunctionhuman_like_recenter
사람처럼 자연스럽게 맵의 중심을 특정 위치로 이동합니다. 봇 탐지를 우회하는 핵심 기법: 1. 랜덤하게 줌 아웃 (9-12레벨) 2. 목표 위치로 대략 이동 3. 원하는 줌 레벨로 확대 4. 정확한 위치
scraper_kr.py:227
↓ 1 callersFunctionmain
프로그램 시작점 사용자로부터 좌표와 줌 레벨을 입력받아 크롤링을 시작합니다.
scraper_kr.py:916
↓ 1 callersFunctionmain
Command-line entry point for interactive scraping. Prompts user for: - Latitude (default: Seoul City Hall) - Longitude - Zoo
scraper_eng.py:566
↓ 1 callersFunctionpixel_to_ll
픽셀 좌표를 위도/경도로 역변환합니다. 지도를 드래그할 때 정확한 위치를 계산하기 위해 필요합니다. 메르카토르 투영법을 사용합니다.
scraper_kr.py:58
↓ 1 callersFunctionpixel_to_ll
Convert pixel coordinates back to latitude/longitude (inverse Mercator). Used for grid sweep to calculate target coordinates from pixel
scraper_eng.py:92
↓ 1 callersFunctionscrape_article_detail
매물 상세 페이지에서 중개사 정보와 과거 전세가를 추출합니다. 수집 정보: - 부동산 상호 (예: 강남부동산) - 중개사 이름 (예: 홍길동) - 연락처 2개 - 과거 전세가 (기전세금) ← 갭투자 분석
scraper_kr.py:335
↓ 1 callersFunctionswitch_to_listing_markers
네이버 부동산 맵에서 '매물 보기' 모드로 전환합니다. 기본은 '단지' 보기인데, '매물' 보기로 바꿔야 개별 매물 정보가 나옵니다. 여러 가지 버튼 텍스트를 시도하여 UI 변경에 대응합니다.
scraper_kr.py:245
Function_build_scenarios
Build API endpoint scenarios based on configured asset types. Naver uses different endpoints for different property types: - 'comple
scraper_eng.py:43
Function_route
(route)
scraper_kr.py:138
Function_route
(route)
scraper_eng.py:318
Function_sale_price_of
(a)
scraper_kr.py:798
Functionclamp_korea
Clamp coordinates to Korean territory boundaries. Prevents navigation outside Korea when calculations drift. Boundaries include Jeju
scraper_eng.py:113
Functiongrid_sweep
Scan area using strategic grid pattern that appears unsystematic. Traditional approach: Visit every grid cell (obvious bot pattern)
scraper_eng.py:240
Functionhandle_response
네이버 API 응답을 가로채서 데이터를 추출합니다. 네이버는 맵을 움직일 때마다 API로 매물 정보를 받아옵니다. 이 함수가 그 응답을 실시간으로 가로채서 파싱합니다.
scraper_kr.py:528
Functionhuman_like_recenter
Navigate to target coordinates using human-like exploration pattern. Humans don't teleport to exact coordinates. They: 1. Zoom out t
scraper_eng.py:126
Functionscrape_article_detail
Extract detailed property information from mobile page. Uses mobile endpoint (m.land.naver.com) for better stability. Single page re
scraper_eng.py:436
Functionsetup_blocking
Block heavy resources (images, fonts, media) for performance. Counterintuitive insight: This makes scraper LESS suspicious. Real use
scraper_eng.py:306
Functionswitch_to_listing_markers
Switch from complex view to listing view via UI toggle. Naver shows either complex markers or individual listing markers. We need li
scraper_eng.py:327