# ScrapeServ - 특정 URL을 스크린샷으로 변환해주는 API 서버

> Clean Markdown view of GeekNews topic #19148. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=19148](https://news.hada.io/topic?id=19148)
- GeekNews Markdown: [https://news.hada.io/topic/19148.md](https://news.hada.io/topic/19148.md)
- Type: news
- Author: [xguru](https://news.hada.io/@xguru)
- Published: 2025-02-10T10:06:01+09:00
- Updated: 2025-02-10T10:06:01+09:00
- Original source: [github.com/US-Artificial-Intelligence](https://github.com/US-Artificial-Intelligence/ScrapeServ)
- Points: 24
- Comments: 1

## Summary

ScrapeServ는 로컬 머신에서 실행되는 API 서버로, 특정 URL을 전송하면 해당 사이트의 데이터를 파일 형태로 받고 여러 구간의 스크린샷을 생성합니다. 이 API 서버는 도커 컨테이너로 실행되며, Playwright를 사용하여 Firefox 브라우저를 통해 작업을 수행합니다. 작업은 큐로 처리되며, HTTP 헤더, 302 리다이렉트, 다운로드 링크를 적절히 처리합니다.

## Topic Body

- 로컬 머신에서 API서버를 실행하고 URL을 전송하면 사이트 데이터를 파일 형태로 받고, 사이트 여러 구간의 스크린샷도 함께 생성  
- 페이지를 스크롤하여 여러 섹션의 스크린샷을 찍음  
- 도커 컨테이너로 실행되며 Playwright를 사용하여 Firefox 브라우저를 실행하여 리소스 소비량은 약간 많음   
- 작업은 큐로 처리되며, HTTP 헤더·302 리다이렉트·다운로드 링크를 제대로 처리  
- 블로킹 API

## Comments



### Comment 34362

- Author: xguru
- Created: 2025-02-10T10:07:02+09:00
- Points: 1

[해커뉴스 댓글](https://news.ycombinator.com/item?id=42965267) 에 이를 대체할만한 재미난 것들이 많네요.   
- 크롬에서 코맨드라인으로 스크린샷 찍기:  
  `chrome --headless --screenshot="path/to/save/screenshot.png" --disable-gpu --window-size=1280,720 "https://www.example.com"`  
- Firefox 버전:   
  `firefox -screenshot file.png https://example.com --window-size=1280,720`  
- Firefox 개발자 콘솔에서 `:screenshot --help` 쳐보면 다양한 옵션 가능   
- 유지관리 작업 같은거 싫으면 아래 대체제들 이용  
  - https://browserless.io - 저수준 브라우저 제어   
  - https://scrapingbee.com - 스크래핑 전문   
  - https://urlbox.com - 스크래핑 전문  
  - https://scrapingfish.com  
  - https://www.scraperapi.com  
  - https://www.airtop.ai  
- 비슷한 프로젝트  
  - https://github.com/sensepost/gowitness  
  - https://github.com/SmilyOrg/website-image-proxy
