scrape: fix

This commit is contained in:
Christine Dodrill 2015-07-28 13:39:39 -07:00
parent 4dda83907f
commit 4ecee40c95
1 changed files with 1 additions and 1 deletions

View File

@ -10,7 +10,7 @@ db\exec [[ BEGIN TRANSACTION; ]]
for page=1,8002
print "Scraping page #{page}..."
with fin = assert io.open "../raw/pages/#{page}.json", "r"
with fin = assert io.open "../raw/pages/#{tostring(page)\sub 1,1}/#{page}.json", "r"
data = fin\read "*a"
posts, _, err = json.decode data
error err unless posts