Added better selectors for testing

This commit is contained in:
Geoff-Robin 2025-10-10 02:37:03 +05:30
parent f82dfbe371
commit 4058d63036

View file

@ -122,8 +122,8 @@ async def test_cron_web_scraper():
await cognee.prune.prune_system(metadata=True) await cognee.prune.prune_system(metadata=True)
urls = ["https://quotes.toscrape.com/", "https://books.toscrape.com/"] urls = ["https://quotes.toscrape.com/", "https://books.toscrape.com/"]
extraction_rules = { extraction_rules = {
"quotes": {"selector": ".quote span.text", "all": True}, "quotes": ".quote .text",
"authors": {"selector": ".quote small", "all": True}, "authors": ".quote .author",
"titles": "article.product_pod h3 a", "titles": "article.product_pod h3 a",
"prices": "article.product_pod p.price_color", "prices": "article.product_pod p.price_color",
} }