Created
September 21, 2015 06:00
-
-
Save matsuhisa/b500c18561bc3c0471cc to your computer and use it in GitHub Desktop.
phantom.js で、jQuery を利用する。og:titleを取得してみた
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 page = require('webpage').create(); | |
page.open('http://tabelog.com/tokyo/A1301/A130101/13142530/', function() { | |
page.includeJs("http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js", function() { | |
var og_title = page.evaluate(function() { | |
return $("meta[property='og:title']").attr("content"); | |
}); | |
console.log(og_title); | |
phantom.exit(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment