Pārlūkot izejas kodu

Bugfix: prefix baseurl to images url

master
Adrian Short pirms 7 gadiem
vecāks
revīzija
2715d297cc
1 mainītis faili ar 1 papildinājumiem un 2 dzēšanām
  1. +1
    -2
      scraper.rb

+ 1
- 2
scraper.rb Parādīt failu

@@ -20,12 +20,11 @@ def parse(app)
matches = record['title'].match(/(\d+\/\d+\/\w+)\s+-\s+(.+)/)
record['council_reference'] = matches[1]
record['type'] = matches[2]
# puts record['council_reference']

app.search("a").each do |link|
record['info_url'] = BASEURL + link['href'].strip if link['href'].match(/Details/)
record['map_url'] = link['href'].strip if link['href'].match(/\?map=/)
record['images_url'] = link['href'].strip if link['href'].match(/ImageMenu/)
record['images_url'] = BASEURL + link['href'].strip if link['href'].match(/ImageMenu/)
record['comment_url'] = BASEURL + link['href'].strip if link['href'].match(/PlanningComments/)
end



Notiek ielāde…
Atcelt
Saglabāt