scrape: fix
This commit is contained in:
parent
4dda83907f
commit
4ecee40c95
|
@ -10,7 +10,7 @@ db\exec [[ BEGIN TRANSACTION; ]]
|
||||||
for page=1,8002
|
for page=1,8002
|
||||||
print "Scraping page #{page}..."
|
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"
|
data = fin\read "*a"
|
||||||
posts, _, err = json.decode data
|
posts, _, err = json.decode data
|
||||||
error err unless posts
|
error err unless posts
|
||||||
|
|
Loading…
Reference in New Issue