2024年下半期のフィルム写真たち ふと気がつくと2024年も残り僅か。 そしてふと振り返るとこのブログに掲載する写真がGRIIIで撮ったものばかりになっていたのだけど、決してフィルムに飽きたということではなく、フィルムはフィルムで淡々と撮り続けているし、モノクロもカラーネガもいつも通り自宅で…

require 'MeCab' require 'rss' require 'mechanize' require 'kconv' require 'hpricot' require 'open-uri' module MeCab class Node def category return self.feature.split(/,/)[0] end def each(&b) b[self] self.next.each(&b) if self.next end end end agent = WWW::Mechanize.new page = agent.get('http://d.hatena.ne.jp/akio0911/archive') # ページを開く m = MeCab::Tagger.new h={} # エントリへのリンクを抽出 page.links_with(:hre
p.49より、HTMLの解析。 pythonではBeautiful Soupを使ってHTMLを解析しているが、RubyなのでHpricotを使う。 hpricotは既に3章序盤でHTMLタグ除去にも使ったが、今回はタグの中身を取り出しに深入りしていく。 3章 その2 - 橋本詳解 pylori*style wiki - HTMLパーサ Hpricot AnHpricotShowcase on Hpricot インストール gem install hpricot p.49の http://kiwitobes.com/wiki/Programming_language.html のリンクを読むのと同じ内容のコード。 hpricot-test.rb #!/opt/local/bin/ruby require 'rubygems' require 'kconv' require 'open-uri
Welcome to WhytheLuckyStiff. You will find many articles about my experiences with running a business as well as varying articles about different topics, recommendations and tips around technology such as smartphones, security and other similar tech news that find myself passionate about. Please enjoy and feel free to send me any feedback whenever you’d like.
Hpricotは Ruby用の HTML パーサです。スキャン部分は C 言語で書かれていて高速に動作します。 HTMLの解析や書き換えに威力を発揮する便利なライブラリです。 rubygemsを使うのが簡単です。 # gem install hpricot すると以下のようにプラットフォームを聞いてきます。Unix系OSであれば 1 を、mswin32 であれば 2 を選びます。 Select which gem to install for your platform (i386-freebsd6) 1. hpricot 0.4 (ruby) 2. hpricot 0.4 (mswin32) 3. Cancel installation コンパイルが始まり、インストールが行われます。 Building native extensions. This could take a while.
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く