Files
hbr-crawler/check_table_structure.py
DonaldFang 方士碩 f524713cb6 Initial commit: HBR 文章爬蟲專案
- Scrapy 爬蟲框架,爬取 HBR 繁體中文文章
- Flask Web 應用程式,提供文章查詢介面
- SQL Server 資料庫整合
- 自動化排程與郵件通知功能

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 17:19:56 +08:00

12 lines
380 B
Python

#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""檢查資料表結構"""
from hbr_crawler.hbr_crawler.database import get_database_manager
db = get_database_manager()
result = db.execute_query('DESCRIBE articles', database='db_A101')
print('articles 資料表結構:')
for row in result:
print(f" 欄位: {row['Field']}, 類型: {row['Type']}, 允許NULL: {row['Null']}")