Skip to content

Commit

Permalink
Strip enumerations in LA Times source
Browse files Browse the repository at this point in the history
  • Loading branch information
mrichards42 committed Jun 6, 2021
1 parent 1cb113e commit d3b8c24
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scripts/download/default_sources.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ return {
url = "http://cdn.games.arkadiumhosted.com/latimes/assets/DailyCrossword/la%y%m%d.xml",
filename = "lat%Y%m%d.jpz",
days = { true, true, true, true, true, true, true },
func = [[
-- Hack: strip out "format", which is used for enumerations
local xml = assert(curl.get(puzzle.url))
xml = xml:gsub('format%s*=%s*"[^"]+"', '')
xml = xml:gsub("format%s*=%s*'[^']+'", "")
local f = assert(io.open(puzzle.filename, 'wb'))
f:write(xml)
f:close()
]]
},

{
Expand Down

0 comments on commit d3b8c24

Please sign in to comment.