seawolf2357 commited on
Commit
cd6f220
·
verified ·
1 Parent(s): 23588da

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -14
app.py CHANGED
@@ -55,22 +55,12 @@ def is_recent_news(time_str):
55
 
56
  time_str = time_str.lower().strip()
57
 
58
- # 디버그 출력
59
- print(f"Processing time string: {time_str}")
60
 
61
- if "day ago" in time_str or "days ago" in time_str:
62
- days = int(re.findall(r'\d+', time_str)[0])
63
- result = days <= 1
64
- print(f"Days ago: {days}, Result: {result}")
65
- return result
66
 
67
- if "hour ago" in time_str or "hours ago" in time_str:
68
- hours = int(re.findall(r'\d+', time_str)[0])
69
- result = hours <= 24
70
- print(f"Hours ago: {hours}, Result: {result}")
71
- return result
72
-
73
- print(f"No match found for: {time_str}")
74
  return False
75
 
76
  def format_results(results):
 
55
 
56
  time_str = time_str.lower().strip()
57
 
58
+ if "1 day ago" in time_str:
59
+ return True
60
 
61
+ if "hours ago" in time_str:
62
+ return True
 
 
 
63
 
 
 
 
 
 
 
 
64
  return False
65
 
66
  def format_results(results):