6 local csv = require "csv" |
6 local csv = require "csv" |
7 |
7 |
8 for line in io.lines(arg[1] or "gsoc15.csv") do |
8 for line in io.lines(arg[1] or "gsoc15.csv") do |
9 local project = {}; |
9 local project = {}; |
10 csv.read_record(line, function (v) project[#project+1] = v; end); |
10 csv.read_record(line, function (v) project[#project+1] = v; end); |
11 local url = project[5] and project[5]:match("https?://[^\"]+"); |
11 local url = project[4] and project[4]:match("https?://[^\"]+"); |
12 if url and url:match("^http"..(have_https and "s?" or "")..":") then |
12 if url and url:match("^http"..(have_https and "s?" or "")..":") then |
13 local data, err = http.request(url); |
13 local data, err = http.request(url); |
14 if not data then |
14 if not data then |
15 print("[FAIL] "..project[2]..": "..tostring(err)); |
15 print("[FAIL] "..project[2]..": "..tostring(err)); |
16 elseif data:match("[%W%p][Ll][Uu][Aa][%W%p]") then |
16 elseif data:match("[%W%p][Ll][Uu][Aa][%W%p]") then |