Sha256: 7d6d1be1ccac78fd20d1509e03d741841d6996f2c23f40ed9771613a84888117

Contents?: true

Size: 276 Bytes

Versions: 12

Compression:

Stored size: 276 Bytes

Contents

module Legitbot
  # http://help.baidu.com/question?prod_en=master&class=498&id=1000973
  class Baidu < BotMatch
    ValidDomains = ["baidu.com.", "baidu.jp."]

    def valid?
      subdomain_of?(*Baidu::ValidDomains)
    end
  end

  rule Legitbot::Baidu, %w(Baiduspider)
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
legitbot-0.3.2 lib/legitbot/baidu.rb
legitbot-0.3.1 lib/legitbot/baidu.rb
legitbot-0.3.0 lib/legitbot/baidu.rb
legitbot-0.2.7 lib/legitbot/baidu.rb
legitbot-0.2.6 lib/legitbot/baidu.rb
legitbot-0.2.4 lib/legitbot/baidu.rb
legitbot-0.2.3 lib/legitbot/baidu.rb
legitbot-0.2.2 lib/legitbot/baidu.rb
legitbot-0.2.1 lib/legitbot/baidu.rb
legitbot-0.2.0 lib/legitbot/baidu.rb
legitbot-0.1.2 lib/legitbot/baidu.rb
legitbot-0.1.0 lib/legitbot/baidu.rb