初始化数据库连接
()
| 42 | |
| 43 | def init_db() -> sqlite3.Connection: |
| 44 | """初始化数据库连接""" |
| 45 | conn = sqlite3.connect(DB_PATH) |
| 46 | conn.row_factory = sqlite3.Row |
| 47 | return conn |
| 48 | |
| 49 | |
| 50 | def paper_exists(conn: sqlite3.Connection, arxiv_id: str) -> bool: |
| 51 | """检查论文是否已存在""" |