Sha256: d59e3983fbb971a35bc2ef69fd6a0ce40fcc198484280c52cb1c24b53313fd05

Contents?: true

Size: 586 Bytes

Versions: 5

Compression:

Stored size: 586 Bytes

Contents

module Legitbot
  # https://yandex.com/support/webmaster/robot-workings/check-yandex-robots.xml

  class Yandex < BotMatch
    ValidDomains = ["yandex.ru.", "yandex.net.", "yandex.com."]

    def valid?
      subdomain_of?(*Yandex::ValidDomains) && reverse_resolves?
    end
  end

  rule Legitbot::Yandex, %w(YandexBot YandexMobileBot YandexImages YandexVideo
    YandexMedia YandexBlogs YandexFavicons YandexWebmaster YandexPagechecker
    YandexImageResizer YandexSitelinks YandexMetrika YandexDirectDyn YandexRCA
    YaDirectFetcher YandexAntivirus YandexVertis YandexCalendar)
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
legitbot-0.2.2 lib/legitbot/yandex.rb
legitbot-0.2.1 lib/legitbot/yandex.rb
legitbot-0.2.0 lib/legitbot/yandex.rb
legitbot-0.1.2 lib/legitbot/yandex.rb
legitbot-0.1.0 lib/legitbot/yandex.rb