()
| 81 | print(f"Error caching URL: {e}") |
| 82 | |
| 83 | def 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 | |
| 96 | def clear_db(): |
| 97 | check_db_path() |
no test coverage detected
searching dependent graphs…