70 lines
2.1 KiB
Python
70 lines
2.1 KiB
Python
"""查找2025年11月11日和18日的船次"""
|
||
import asyncio
|
||
import sys
|
||
sys.path.insert(0, '.')
|
||
|
||
from confluence.client import ConfluenceClient
|
||
|
||
async def check_nov_dates():
|
||
"""检查11月11日和18日的船次"""
|
||
print("=" * 60)
|
||
print("🔍 查找2025年11月11日和18日的船次")
|
||
print("=" * 60)
|
||
|
||
client = ConfluenceClient()
|
||
|
||
# 2025.11月度统计页面ID: 151907843
|
||
page_id = "151907843"
|
||
|
||
try:
|
||
children = await client.get_children(page_id, limit=200)
|
||
print(f"\n📄 找到 {len(children)} 个子页面\n")
|
||
|
||
# 查找包含11月11日或18日的页面
|
||
target_dates = ['2025.11.11', '2025.11.18']
|
||
|
||
print(f"查找日期: {target_dates}")
|
||
print("-" * 60)
|
||
|
||
found_ships = []
|
||
for child in children:
|
||
title = child.get('title', '')
|
||
child_id = child.get('id', '')
|
||
|
||
# 检查是否包含目标日期
|
||
for date_str in target_dates:
|
||
if date_str in title:
|
||
found_ships.append((title, child_id))
|
||
print(f"✅ 找到: {title} (ID: {child_id})")
|
||
break
|
||
|
||
if not found_ships:
|
||
print("❌ 未找到11月11日或18日的船次")
|
||
|
||
# 列出所有11月的船次
|
||
print(f"\n📅 2025年11月所有船次(部分列表):")
|
||
print("-" * 60)
|
||
|
||
nov_ships = []
|
||
for child in children:
|
||
title = child.get('title', '')
|
||
if '2025.11' in title or '2025.11' in title:
|
||
nov_ships.append(title)
|
||
|
||
nov_ships.sort()
|
||
for i, title in enumerate(nov_ships[:15], 1):
|
||
print(f" {i}. {title}")
|
||
|
||
if len(nov_ships) > 15:
|
||
print(f" ... 还有 {len(nov_ships) - 15} 个")
|
||
|
||
except Exception as e:
|
||
print(f"\n❌ 错误: {e}")
|
||
import traceback
|
||
traceback.print_exc()
|
||
finally:
|
||
await client.close()
|
||
|
||
if __name__ == "__main__":
|
||
asyncio.run(check_nov_dates())
|