Working fetch search, refactoring DB towards source search

This commit is contained in:
Luciano Gervasoni
2025-03-20 11:42:33 +01:00
parent 83f76232b2
commit 05e17266f1
14 changed files with 558 additions and 120 deletions

View File

@@ -1,5 +1,5 @@
from .db_utils import DB_Handler
from ..models import Feed
from ..models import Search
import feedparser
import dateutil
import traceback
@@ -15,7 +15,7 @@ class FetchFeeds():
logger.debug("Starting FetchFeeds.run()")
# Get feeds
list_url_feeds = list(Feed.objects.values_list('rss_feed', flat=True))
list_url_feeds = list(Search.objects.filter(type=Search.TYPE_ENUM.RSS_FEED).values_list('search', flat=True))
logger.debug("Fetching from feeds: {}".format(list_url_feeds))
# Process via RSS feeds