Skip to content

Instantly share code, notes, and snippets.

@codian
Created March 22, 2012 12:55
Show Gist options
  • Save codian/2158145 to your computer and use it in GitHub Desktop.
Save codian/2158145 to your computer and use it in GitHub Desktop.
PhantomJS로 현재 TV 편성표 이미지로 떨구기
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