Created
March 22, 2012 12:55
-
-
Save codian/2158145 to your computer and use it in GitHub Desktop.
PhantomJS로 현재 TV 편성표 이미지로 떨구기
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
page = new WebPage() | |
url = 'http://search.naver.com/search.naver?where=nexearch&query=tv%ED%8E%B8%EC%84%B1%ED%91%9C&x=0&y=0&sm=top_sug.pre&fbm=0&acr=1&acq=TV&qdt=0&ie=utf8' | |
page.open url, (status) -> | |
if (status != "success") | |
console.log "invalid response: #{status}" | |
phantom.exit() | |
page.clipRect = { top: 340, left: 180, width: 590, height: 400 } | |
page.render('tv.png') | |
phantom.exit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment