Skip to content

Commit

Permalink
Updated test and stats to new crawl.json format
Browse files Browse the repository at this point in the history
  • Loading branch information
rgaudin committed Jan 31, 2023
1 parent 554fff5 commit 4b7e504
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions test/integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ def test_user_agent():
def test_stats_output():
with open("/output/crawl.json") as fh:
assert json.loads(fh.read()) == {
"numCrawled": 5,
"workersRunning": 0,
"crawled": 5,
"pending": 0,
"pendingPages": [],
"total": 5,
"limit": {"max": 0, "hit": False},
}
Expand Down
2 changes: 1 addition & 1 deletion zimit.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def crawl_conv(data, limit):
limit.max = data["limit"]["max"]
limit.hit = data["limit"]["hit"]
return {
"done": data["numCrawled"],
"done": data["crawled"],
"total": int(data["total"] / 0.9),
"limit": limit.as_dict,
}
Expand Down

0 comments on commit 4b7e504

Please sign in to comment.