Spaces:
Sleeping
Sleeping
Update rss_processor.py
Browse files- rss_processor.py +4 -1
rss_processor.py
CHANGED
@@ -9,6 +9,7 @@ import shutil
|
|
9 |
import rss_feeds
|
10 |
from datetime import datetime
|
11 |
import dateutil.parser # For flexible date parsing
|
|
|
12 |
|
13 |
# Setup logging
|
14 |
logging.basicConfig(level=logging.INFO)
|
@@ -68,7 +69,9 @@ def fetch_rss_feeds():
|
|
68 |
continue
|
69 |
|
70 |
# Use a robust key for deduplication
|
71 |
-
key = f"{title}|{link}|{published}"
|
|
|
|
|
72 |
if key not in seen_keys:
|
73 |
seen_keys.add(key)
|
74 |
# Try multiple image sources
|
|
|
9 |
import rss_feeds
|
10 |
from datetime import datetime
|
11 |
import dateutil.parser # For flexible date parsing
|
12 |
+
import hashlib
|
13 |
|
14 |
# Setup logging
|
15 |
logging.basicConfig(level=logging.INFO)
|
|
|
69 |
continue
|
70 |
|
71 |
# Use a robust key for deduplication
|
72 |
+
#key = f"{title}|{link}|{published}"
|
73 |
+
key = f"{title.lower()}|{link.lower()}|{published}|{hash(description.encode('utf-8'))}"
|
74 |
+
|
75 |
if key not in seen_keys:
|
76 |
seen_keys.add(key)
|
77 |
# Try multiple image sources
|