タグ

関連タグで絞り込む (1)

タグの絞り込みを解除

nokogiriに関するSixeightのブックマーク (5)

  • Nokogiriが文字化けするのの対策 - hitode909の日記


    HTMLNokogiri NokogiriHTMLcharsetcharsetcharset   charset = io.scan(/charset="?([^\s"]*)/i).flatten.inject(Hash.new{0}){|a, b| a[b]+=1 a }.to_a.sort_by{|a| a[1] }.reverse.first[0] before "\u0082«\u0083¼\u0083\u0089\u0083\u0095\u0082\u0082\u0083\u0088!! \u0083´\
  • Ruby Scraping - Nokogiriのタグ検索機能


    XML::NodeSet mapfindfind_allEnumerable使 Node NodeSetNode  empty?() Is this NodeSet? empty? each() {|self[x]| ...} Iterate over each node, yielding to block first() Get the first element of the NodeSet?. last() Get the last element of the NodeSet?. size() document NodeSetDocument  /(*p
  • Overview

    Overview Overview API Support Tutorials Changelog About Nokogiri¶ Nokogiri (鋸) makes it easy and painless to work with XML and HTML from Ruby. It provides a sensible, easy-to-understand API for reading, writing, modifying, and querying documents. It is fast and standards-compliant by relying on native parsers like libxml2, libgumbo, and xerces. Guiding Principles¶ Some guiding principles Nokogiri

    Overview
  • スクレイピングのためのNokogiri利用メモ - それはそれ、これはこれ


     http://nokogiri.rubyforge.org/nokogiri/Nokogiri.html ()HTML 2014-02-16 Ruby1.9/2 MechanizeWWW::Mechanize  Mechanize  (0)  RubyHTMLDOMCSSXPath (1)  Nokogiri::HTML::Document < Nokogiri::XML::Document < Nokogiri::XML::Node < Object Nokogiri::XML::
    スクレイピングのためのNokogiri利用メモ - それはそれ、これはこれ
  • Route 477(2009-04-28)

    ■ [ruby][scraping] Nokogiriに新機能が取り込まれたよ NokogiriにもWeb::Scraperのshellみたいのが欲しいなーと思っていて、そしたらSequel添付のsequelコマンドが irbを使ってそれっぽいことを簡単に実現してたので、真似してみた。bin/nokogiri んで、コミットしてpull request送ったら採用されました。これは嬉しい。 http://github.com/tenderlove/nokogiri/commit/3038d868ebb620b1bc9a197beefc328d2a4c063e 使い方は、 $ nokogiri http://www.ruby-lang.org/ (もしくはHTMlファイルのパス) などとすると、変数@docに指定URLのHTMLを表すNokogiriオブジェクトが入った状態でirbが起動する

    Route 477(2009-04-28)
  • 1