10.times do |i| puts "I Love Ruby!!" end => "I Love Ruby!!" "I Love Ruby!!" "I Love Ruby!!" "I Love Ruby!!" "I Love Ruby!!" "I Love Ruby!!" "I Love Ruby!!" "I Love Ruby!!" "I Love Ruby!!" "I Love Ruby!!"
# ApplicationSpider is a default base spider class. You can set here # default settings for all spiders inherited from ApplicationSpider. # To generate a new spider, run: `$ kimurai generate spider spider_name` require'net/http' require'kimurai' classApplicationSpider < Kimurai::Base includeApplicationHelper
@engine = :selenium_chrome USER_AGENTS = []
# PROXIES = ["127.0.0.1:1086:socks5"]
@config = { user_agent:"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36", skip_request_errors: [{ error:RuntimeError, message:"404 => Net::HTTPNotFound" }], retry_request_errors: [Net::ReadTimeout], restart_if: { }, before_request: { delay:4..7 } } end