URL을 깔끔한 Markdown으로 변환하는 CLI 도구입니다.
HashScraper 웹 크롤링 및 콘텐츠 추출 서비스 기반.
npm install -g @hashscraper/cliNode.js 18 이상 필요.
hashscraper.com에서 API 키를 발급받은 후 설정합니다:
hashscraper config set api_key YOUR_API_KEY또는 환경변수로 설정:
export HASHSCRAPER_API_KEY=YOUR_API_KEYhashscraper https://example.comhashscraper https://example.com -o output.mdhashscraper https://a.com https://b.com --output-dir ./resultshashscraper --input urls.txt --output-dir ./resultshashscraper https://example.com --jsonhashscraper https://example.com --format text| 명령어 | 설명 |
|---|---|
hashscraper <urls...> |
URL을 Markdown으로 변환 (기본) |
hashscraper credits |
잔여 크레딧 조회 |
hashscraper config set <key> <value> |
설정값 저장 (api_key, base_url) |
hashscraper config get <key> |
설정값 조회 |
| 옵션 | 설명 | 기본값 |
|---|---|---|
--api-key <key> |
API 키 (설정 파일보다 우선) | — |
-o, --output <path> |
파일로 저장 (단일 URL만 가능) | stdout |
--output-dir <dir> |
각 결과를 디렉토리에 저장 | — |
--format <format> |
markdown 또는 text |
markdown |
--json |
메타데이터 포함 JSON 출력 | — |
--timeout <ms> |
요청 타임아웃 | 30000 |
--input <file> |
텍스트 파일에서 URL 읽기 | — |
--api-key플래그HASHSCRAPER_API_KEY환경변수~/.hashscraper/config.json설정 파일
| 코드 | 의미 |
|---|---|
| 0 | 모든 URL 처리 성공 |
| 1 | 전체 실패 |
| 2 | 부분 실패 (일부 성공, 일부 실패) |
MIT
