diff --git a/ai_processor/article_processor.py b/ai_processor/article_processor.py index e7ebdd0..4b8ec5c 100644 --- a/ai_processor/article_processor.py +++ b/ai_processor/article_processor.py @@ -25,7 +25,7 @@ class ArticleProcessor: self.cache_manager = CacheManager(CACHE_FILE) self.batch_size = BATCH_SIZE - def find_unprocessed_articles(self, scraper_dir: str = "/app/articles") -> List[Tuple[str, str]]: + def find_unprocessed_articles(self, scraper_dir: str = "../scraper/articles") -> List[Tuple[str, str]]: """ Find all unprocessed articles in the scraper directory. @@ -44,6 +44,7 @@ class ArticleProcessor: logger.warning(f"Scraper directory does not exist: {scraper_dir}") # Try alternative paths alternative_paths = [ + "../scraper/articles", "/scraper/articles", "/app/articles", "/articles" @@ -149,7 +150,7 @@ class ArticleProcessor: logger.info(f"Batch completed: {successful} successful, {failed} failed") return successful, failed - def process_all_articles(self, scraper_dir: str = "/scraper/articles") -> dict: + def process_all_articles(self, scraper_dir: str = "../scraper/articles") -> dict: """ Process all unprocessed articles in the scraper directory. @@ -212,7 +213,7 @@ class ArticleProcessor: return stats - def process_new_articles(self, scraper_dir: str = "/scraper/articles") -> dict: + def process_new_articles(self, scraper_dir: str = "../scraper/articles") -> dict: """ Process only new articles (those that haven't been processed yet). This is designed for real-time processing of new articles. @@ -223,4 +224,4 @@ class ArticleProcessor: Returns: Dictionary with processing statistics """ - return self.process_all_articles(scraper_dir) \ No newline at end of file + return self.process_all_articles(scraper_dir)