Working fetch search, refactoring DB towards source search
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user