Mechanize の user_agent_alias

2020/04/19

http://rubydoc.info/gems/mechanize/Mechanize or gem が入ってる場所にある mechanize.rb のソースコード Version 2.7.3 ではこんな感じだった。

##
  # Supported User-Agent aliases for use with user_agent_alias=.  The
  # description in parenthesis is for informative purposes and is not part of
  # the alias name.
  #
  # * Linux Firefox (3.6.1)
  # * Linux Konqueror (3)
  # * Linux Mozilla
  # * Mac Firefox (3.6)
  # * Mac Mozilla
  # * Mac Safari (5)
  # * Mac Safari 4
  # * Mechanize (default)
  # * Windows IE 6
  # * Windows IE 7
  # * Windows IE 8
  # * Windows IE 9
  # * Windows Mozilla
  # * iPhone (3.0)
  # * iPad
  # * Android (Motorola Xoom)
  #
  # Example:
  #
  #   agent = Mechanize.new
  #   agent.user_agent_alias = 'Mac Safari'