05.02.2020, 09:21
Some extra parsing of cookie header is required. Try this for the second request:
Code:
cookies = hdrs['set-cookie']
session = cookies:match('(unifises=[^;]+)')
token = cookies:match('(csrf_token=[^;]+)')
cookie = session .. '; ' .. token
res, err = http.request({
url = url2,
headers = {
cookie = cookie,
},
sink = ltn12.sink.table(tbl),
})