Sha256: 352549e029f934ea0ad9f8ec7711ced8e869aa08ce4e049b016a432946e13d1a

Contents?: true

Size: 670 Bytes

Versions: 7

Compression:

Stored size: 670 Bytes

Contents

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

  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 YandexAccessibilityBot YandexMobileBot
    YandexDirectDyn YandexScreenshotBot YandexImages YandexVideo YandexVideoParser
    YandexMedia YandexBlogs YandexFavicons YandexWebmaster YandexPagechecker
    YandexImageResizer YaDirectFetcher YandexCalendar YandexSitelinks YandexMetrika
    YandexNews YandexVertis YandexSearchShop YandexVerticals)
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
legitbot-0.3.2 lib/legitbot/yandex.rb
legitbot-0.3.1 lib/legitbot/yandex.rb
legitbot-0.3.0 lib/legitbot/yandex.rb
legitbot-0.2.7 lib/legitbot/yandex.rb
legitbot-0.2.6 lib/legitbot/yandex.rb
legitbot-0.2.4 lib/legitbot/yandex.rb
legitbot-0.2.3 lib/legitbot/yandex.rb