浏览代码

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



正在加载...
取消
保存