Skip to content

Commit c9599f4

Browse files
committed
More logging
1 parent 9970d45 commit c9599f4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

newshomepages/extract/consolidate.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,11 @@ def consolidate(
102102

103103
# Pull out the files
104104
qualified_files = []
105+
print(f"-- Reviewing {len(item_data['files'])} files for {handle}")
105106
for p in item_data["files"]:
106107
if handle in p["name"].lower():
107108
# Check if the file is of a type we want
108-
if p["format"] in ["JSON", "JPEG", "HTML"]:
109+
if p["format"].upper() in ["JSON", "JPEG", "HTML"]:
109110
qualified_files.append(p)
110111
elif p["name"].lower().endswith("ads.txt"):
111112
qualified_files.append(p)
@@ -126,7 +127,7 @@ def consolidate(
126127
)
127128
file_list.append(file_dict)
128129

129-
print(f"-- {len(qualified_files)} found")
130+
print(f"-- {len(qualified_files)} qualified files found")
130131

131132
# Write out items
132133
utils.write_csv(item_list, output_path / "items.csv")

0 commit comments

Comments
 (0)