lib/wmap/url_crawler/adware_tag.rb
# Given a site, determine the landing url
Given a site, determine the landing url
Given a site determine the landing url
def fast_landing(site)
      puts "Locate the landing url for: #{site}" if @verbose
      my_tracker=Wmap::SiteTracker.instance
      if my_tracker.known_sites.key?(site)
        if my_tracker.known_sites[site]['code'] >= 300 && my_tracker.known_sites[site]['code'] < 400
          url = my_tracker.known_sites[site]['redirection']
        else
          url = site
        end
        my_tracker = nil
      else
        my_checker = Wmap::UrlChecker.new
        url = my_checker.landing_location(site)
        my_checker = nil
      end
      puts "Landing url found: #{url}" if @verbose
      return url
    rescue => ee
      puts "Exception on method #{__method__}: #{ee}" if @verbose
    end
def fast_landing ( site ) puts "Locate the landing url for: #{site}" if @verbose my_tracker = Wmap :: SiteTracker . instance if my_tracker . known_sites . key? ( site ) if my_tracker . known_sites [ site ] [ 'code' ] >= 300 && my_tracker . known_sites [ site ] [ 'code' ] < 400 url = my_tracker . known_sites [ site ] [ 'redirection' ] else url = site end my_tracker = nil else my_checker = Wmap :: UrlChecker . new url = my_checker . landing_location ( site ) my_checker = nil end puts "Landing url found: #{url}" if @verbose return url rescue => ee puts "Exception on method #{__method__}: #{ee}" if @verbose end
Given a site, determine the landing url
Given a site determine the landing url
# looking into the cache first # no cache, then need to do it fresh
site
<not_specific>