Skip to content

Commit

Permalink
Removed tracing.
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelBone committed May 14, 2019
1 parent b9da420 commit eb3f3ee
Showing 1 changed file with 4 additions and 18 deletions.
22 changes: 4 additions & 18 deletions scraper.rb
Expand Up @@ -30,25 +30,11 @@
puts " Raw date text 2: " + possible_date_2
matches_1 = possible_date_1.scan(/\b[0-9][0-9]?\s+[A-Z][A-Z][A-Z][A-Z]?\s+[0-9][0-9][0-9][0-9]$/i)
matches_2 = possible_date_2.scan(/\b[0-9][0-9]?\s+[A-Z][A-Z][A-Z][A-Z]?\s+[0-9][0-9][0-9][0-9]$/i)
puts matches_1
puts matches_2
if (matches_1.nil?)
puts "matches_1 is nil"
else
puts "found matches 1"
puts matches_1[0]
end
if (matches_2.nil?)
puts "matches_2 is nil"
else
puts "found matches 2"
puts matches_2[0]
end
parsed_date = ""
if (!matches_1.nil? and matches_1.length >= 1)
parsed_date = Date.parse(matches_1[0][0]).to_s
elsif (!matches_2.nil? and matches_2.length >= 1)
parsed_date = Date.parse(matches_2[0][0]).to_s
if (matches_1.length >= 1)
parsed_date = Date.parse(matches_1[0]).to_s
elsif (matches_2.length >= 1)
parsed_date = Date.parse(matches_2[0]).to_s
end

record = {
Expand Down

0 comments on commit eb3f3ee

Please sign in to comment.