Skip to content

Commit f077f77

Browse files
committed
Fixes n1k0#1 - Renamed json() to outputJSON().
1 parent 525950c commit f077f77

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

phantom-scrape.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@ var url = system.args[1];
66
// XXX: should we log these instead?
77
phantom.onError = page.onError = function(){};
88

9-
function json(object) {
9+
function outputJSON(object) {
1010
console.log(JSON.stringify(object, null, 2));
1111
}
1212

1313
if (!url) {
14-
json({error: "Missing url"});
14+
outputJSON({error: "Missing url"});
1515
phantom.exit();
1616
}
1717

1818
page.open(url, function(status) {
1919
if (status !== "success") {
20-
json({error: "Unable to access " + url});
20+
outputJSON({error: "Unable to access " + url});
2121
return phantom.exit();
2222
}
2323
page.injectJs("vendor/Readability.js");
24-
json(page.evaluate(function(url) {
24+
outputJSON(page.evaluate(function(url) {
2525
var location = document.location;
2626
var uri = {
2727
spec: location.href,

0 commit comments

Comments
 (0)