AiNewsV2 / nodes /scraper_nodes.py
Phoenix21's picture
Modular code
7516245
raw
history blame contribute delete
301 Bytes
from state import ArticleScraperState
from tools.scraper import scrape_article
def scrape_article_content(state: ArticleScraperState):
"""Scrape the content from a news article URL"""
url = state["url"]
article_content = scrape_article(url)
return {"article_content": article_content}