Implement recursive page crawling

This commit is contained in:
rmgr 2023-12-06 08:29:39 +10:30
parent 3d7b72e5ef
commit 9fc2e1af53
5 changed files with 47 additions and 26 deletions

View file

@ -27,7 +27,7 @@ def build_index():
if len(matching_urls) == 0:
# if not url.strip() in dictionary[word]:
entries = dictionary[word]
entry = {"url": url.strip(), "count": 1}
entry = {"url": url.strip(), "count": 1, "filename": str(path)}
dictionary[word].append(entry)
else:
entries = dictionary[word]