웹 캡처 및 변환 도구

Python으로 모바일 웹 사이트의 스크린 샷 찍기

파이썬 API

GrabzIt Python API 웹 사이트 모바일 버전의 스크린 샷을 찍을 수있는 기능을 제공하지만 모든 웹 사이트에 특별한 모바일 버전이있는 것은 아니므로 모든 상황에서 작동하지 않을 수 있습니다. 테이블을 추출 할 때뿐만 아니라 이미지 및 PDF 스크린 샷 모두에 대해 모바일 스크린 샷을 요청할 수 있습니다.

이렇게하려면 1를 setRequestAs 생성시 옵션 객체의 속성 영상, PDF or 테이블, 아래 그림과 같이. 그러면 대상 웹 사이트의 모바일 버전을 요청합니다.

모바일 스크린 샷을 더 인증하려면 표준 모바일 브라우저 너비를 browserWidth 의 속성 GrabzItImageOptions 수업. 또는 PDF를 작성하는 경우 더 작은 페이지 크기를 선택하십시오.

from GrabzIt import GrabzItClient
from GrabzIt import GrabzItImageOptions

options = GrabzItImageOptions.GrabzItImageOptions()
options.format = "png"
options.browserWidth = 320
options.width = 256
options.height = 256
options.requestAs = 1

grabzIt = GrabzItClient.GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret")
grabzIt.URLToImage("https://www.tesla.com", options)
grabzIt.Save("http://www.mysite.com/handler.py")