Last active
May 10, 2018 18:12
-
-
Save lyhcode/6d7e8d0748333bbb0ae7bc1913f97e4d to your computer and use it in GitHub Desktop.
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
var system = require('system'); | |
var url = system.args[1]; | |
var filename = system.args[2]; | |
var page = new WebPage(); | |
page.viewportSize = { | |
width: 1920, | |
height: 1080 | |
}; | |
page.clipRect = { | |
top: 0, | |
left: 0, | |
width: 1920, | |
height: 1080 | |
}; | |
page.settings.userAgent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36'; | |
page.open(url, function (status) { | |
page.render(filename); | |
phantom.exit(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment