- KBO 선수 기록 조회 로직을 공통화하고 투수, 수비, 주루 카테고리 추가 - CLI 명령어를 hitter에서 player <type>으로 통합 및 필터 옵션 강화 - ASP.NET AJAX 응답 파싱 방식을 개선하여 데이터 누락 문제 해결 - 정규시즌과 포스트시즌의 서로 다른 페이지 구조 및 컬럼 대응 지원
24 lines
933 B
TypeScript
24 lines
933 B
TypeScript
import type { PlayerPageConfig } from "./common.js";
|
|
|
|
export const HITTER_COLUMNS = [
|
|
"rank", "player", "team", "avg", "games", "pa", "ab",
|
|
"runs", "hits", "doubles", "triples", "hr", "tb", "rbi", "sac", "sf",
|
|
] as const;
|
|
|
|
export const HITTER_POSTSEASON_COLUMNS = [
|
|
"rank", "player", "team", "avg", "games", "pa", "ab",
|
|
"hits", "doubles", "triples", "hr", "rbi", "sb", "cs",
|
|
"bb", "hbp", "so", "gdp", "errors",
|
|
] as const;
|
|
|
|
export type HitterStats = Record<(typeof HITTER_COLUMNS)[number], string>;
|
|
|
|
export const HITTER_CONFIG: PlayerPageConfig = {
|
|
url: "https://www.koreabaseball.com/Record/Player/HitterBasic/Basic1.aspx",
|
|
postseasonUrl: "https://www.koreabaseball.com/Record/Player/HitterBasic/BasicOld.aspx",
|
|
postseasonColumns: HITTER_POSTSEASON_COLUMNS,
|
|
defaultSortCol: "HRA_RT",
|
|
dropdowns: ["ddlSeason", "ddlSeries", "ddlTeam", "ddlPos", "ddlSituation", "ddlSituationDetail"],
|
|
columns: HITTER_COLUMNS,
|
|
};
|