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

Function get_total_count

crawl4ai/database.py:83–94  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

81 print(f"Error caching URL: {e}")
82
83def get_total_count() -> int:
84 check_db_path()
85 try:
86 conn = sqlite3.connect(DB_PATH)
87 cursor = conn.cursor()
88 cursor.execute('SELECT COUNT(*) FROM crawled_data')
89 result = cursor.fetchone()
90 conn.close()
91 return result[0]
92 except Exception as e:
93 print(f"Error getting total count: {e}")
94 return 0
95
96def clear_db():
97 check_db_path()

Callers 1

get_total_url_countFunction · 0.90

Calls 2

check_db_pathFunction · 0.85
closeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…