class NHKore::SearchScraper
@author Jonathan Bradley Whited @since 0.2.0
Constants
- DEFAULT_RESULT_COUNT
- FUTSUU_REGEX
- FUTSUU_SITE
- IGNORE_LINK_REGEX
- YASASHII_REGEX
www3.nhk.or.jp/news/easy/k10012294001000/k10012294001000.html
- YASASHII_SITE
Public Class Methods
new(url,eat_cookie: true,header: {},**kargs)
click to toggle source
Search Engines are strict, so trigger using the default HTTP header fields with +header: {}+ and fetch/set the cookie using +eat_cookie: true+.
Calls superclass method
NHKore::Scraper::new
# File lib/nhkore/search_scraper.rb, line 49 def initialize(url,eat_cookie: true,header: {},**kargs) super(url,eat_cookie: eat_cookie,header: header,**kargs) end
Public Instance Methods
ignore_link?(link,cleaned: true)
click to toggle source
# File lib/nhkore/search_scraper.rb, line 53 def ignore_link?(link,cleaned: true) return true if link.nil? link = Util.unspace_web_str(link).downcase unless cleaned return true if link.empty? return true if IGNORE_LINK_REGEX.match?(link) return false end