Skip to content

Instantly share code, notes, and snippets.

@hashimotor
Created August 15, 2013 05:54
Show Gist options
  • Save hashimotor/6238575 to your computer and use it in GitHub Desktop.
Save hashimotor/6238575 to your computer and use it in GitHub Desktop.
Amazonの本の単価や出版社を表示する。正確にパースしてないのでよく失敗する
javascript:(function(){%20function%20g(e){return%20document.getElementById(e);};%20var%20s="%E6%9B%B8%E5%90%8D\n"%20+%20g("btAsinTitle").firstChild.data%20+"\n%E8%91%97%E8%80%85\n"%20+g("btAsinTitle").parentNode.nextSibling.nextSibling.firstChild.data%20+"\n%E7%99%BA%E8%A1%8C%E8%80%85\n"%20+g("SalesRank").parentNode.childNodes[3].childNodes[1].data.trim().split("%20")[0]%20+"\nISBN\n"%20+g("SalesRank").parentNode.childNodes[5].childNodes[1].data.trim()%20+"\n%E5%8D%98%E4%BE%A1\n"%20+g("actualPriceValue").childNodes[0].childNodes[0].data.trim().replace(/.*(\d),(\d\d\d).*/,"$1$2")%20+"\n%E7%99%BA%E8%A1%8C%E5%B9%B4\n"%20+g("SalesRank").parentNode.childNodes[3].childNodes[1].data.match(/\d+/)[0];%20alert(s);%20})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment