{"type":"rich","published":"2013-03-10 22:34:16","blog_url":"https://yolatengo8888.hatenadiary.org/","categories":[],"width":"100%","url":"https://yolatengo8888.hatenadiary.org/entry/20130310/1362922456","blog_title":"There is no free lunch","author_name":"yolatengo8888","provider_name":"Hatena Blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyolatengo8888.hatenadiary.org%2Fentry%2F20130310%2F1362922456\" title=\"Ruby\u3067Yahoo\u30d5\u30a1\u30a4\u30ca\u30f3\u30b9\u3092\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0 - There is no free lunch\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","image_url":null,"provider_url":"https://hatena.blog","version":"1.0","title":"Ruby\u3067Yahoo\u30d5\u30a1\u30a4\u30ca\u30f3\u30b9\u3092\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0","author_url":"https://blog.hatena.ne.jp/yolatengo8888/","description":"Nokogiri\u3092\u4f7f\u3063\u305f\u3089\u7c21\u5358\u306b\u3067\u304d\u305f\u3002 # coding: utf-8 require 'nokogiri' require 'open-uri' def get_content(html, tag, className, index, childPath=nil) html.search(\"//#{tag}[@class='#{className}']#{childPath}\")[index].content end class StockInfo def initialize(stockCode) @stockCode = stockCode scrape end attr_reader\u2026","height":"190"}