We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a774a13 commit d272ec9Copy full SHA for d272ec9
newshomepages/extract/consolidate.py
@@ -3,6 +3,7 @@
3
from __future__ import annotations
4
5
import json
6
+import random
7
import shutil
8
import time
9
from datetime import datetime
@@ -105,9 +106,9 @@ def consolidate(
105
106
print(f"-- Reviewing {len(item_data['files'])} files for {handle}")
107
# Print the first one for review
108
if item_data["files"]:
- print(f"--- First file: {item_data['files'][0]}")
109
+ print(f"--- Random file: {random.choice(item_data['files'])}")
110
for p in item_data["files"]:
- if handle in p["name"].lower():
111
+ if handle.lower() in p["name"].lower():
112
# Check if the file is of a type we want
113
if p["format"].upper() in ["JSON", "JPEG", "HTML"]:
114
qualified_files.append(p)
0 commit comments