class JobParser::Facets::Apply

Public Instance Methods

parse() click to toggle source
# File lib/jobparser/facets/apply.rb, line 4
def parse
  link = nil
  elements["a"].each do |anchor|
    APPLY_LINK_REGEX.match(anchor.content) { link = anchor }
  end
  if link && link.attributes["href"].to_s.downcase.include?("javascript:") == false
    Cleaner.make_link_absolute(@url, link.attributes["href"].to_s.gsub(" ", "%20"))
  else
    @url
  end
end