MCPcopy
hub / github.com/unclecode/crawl4ai / aget_cached_url

Method aget_cached_url

crawl4ai/async_database.py:58–65  ·  view source on GitHub ↗
(self, url: str)

Source from the content-addressed store, hash-verified

56 print(f"Error altering database to add {new_column} column: {e}")
57
58 async def aget_cached_url(self, url: str) -> Optional[Tuple[str, str, str, str, str, str, str, bool, str]]:
59 try:
60 async with aiosqlite.connect(self.db_path) as db:
61 async with db.execute('SELECT url, html, cleaned_html, markdown, extracted_content, success, media, links, metadata, screenshot FROM crawled_data WHERE url = ?', (url,)) as cursor:
62 return await cursor.fetchone()
63 except Exception as e:
64 print(f"Error retrieving cached URL: {e}")
65 return None
66
67 async def acache_url(self, url: str, html: str, cleaned_html: str, markdown: str, extracted_content: str, success: bool, media: str = "{}", links: str = "{}", metadata: str = "{}", screenshot: str = ""):
68 try:

Callers 1

arunMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected