mirror of
https://github.com/bellingcat/cisticola.git
synced 2026-06-12 05:18:33 +03:00
Search for since per-channel
This commit is contained in:
@@ -6,6 +6,7 @@ from loguru import logger
|
||||
|
||||
MAX_POSTS = 10
|
||||
|
||||
|
||||
class ScraperController:
|
||||
"""Registers scrapers, uses them to generate ScraperResults. Synchronizes
|
||||
everything with database via ORM."""
|
||||
@@ -34,7 +35,8 @@ class ScraperController:
|
||||
|
||||
# get most recent post
|
||||
session = self.session()
|
||||
rows = session.query(cisticola.base.ScraperResult).order_by(
|
||||
rows = session.query(cisticola.base.ScraperResult).where(
|
||||
cisticola.base.ScraperResult.channel == channel.id).order_by(
|
||||
cisticola.base.ScraperResult.date.desc()).limit(1).all()
|
||||
|
||||
if len(rows) == 1:
|
||||
|
||||
Reference in New Issue
Block a user