
if #arg == 2 then
  local file = io.open(arg[1], 'r')
  local text = file:read('*a')
  file:close()
  
  local i, j = string.find(text, 'The Wayback Machine.+Newer Post')
  text = string.sub(text, i + 22, j - 11)
  --print(text)
  
  local url, text2, garbage, labels = string.match(text, '(https://web.archive.org.-html).+%[ROBERT FAURISSON%](.+)(.Posted by %a+ %a+ %[%].)(.+)')
  
  if url then
	local url2 = string.match(url, '(http://robertfaurisson.blogspot.com.-html)')
    if url2 == nil then
      url2 = string.match(url, '(https://robertfaurisson.blogspot.com.-html)')
    end
	text = url2 .. text2 .. labels
  end
  
  file = io.open(arg[2], 'w')
  file:write(text)
  file:close()
else
  print('Paramètres manquants')
end
