瀏覽代碼

Bugfix: prefix baseurl to images url

master
Adrian Short 7 年之前
父節點
當前提交
2715d297cc
共有 1 個檔案被更改,包括 1 行新增2 行删除
  1. +1
    -2
      scraper.rb

+ 1
- 2
scraper.rb 查看文件

@@ -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



Loading…
取消
儲存