fix: 学时历史改为读取我的学时页面
This commit is contained in:
@@ -1212,6 +1212,28 @@ def test_history_course_path_follows_type_and_keeps_explicit_url() -> None:
|
||||
assert named["path"] == "/kng/view/package/abc.html"
|
||||
|
||||
|
||||
def test_period_page_minutes_match_the_official_table() -> None:
|
||||
from euniv.client import history_rows_from_page, period_cards
|
||||
|
||||
html = """
|
||||
<span id="spTotalPeriod" title="24522分钟">2452...</span>
|
||||
<span id="spAnnualPeriod" title="10209分钟">1020...</span>
|
||||
<span id="spMonthlyPeriod" title="126分钟">126</span>
|
||||
<tr class="alter">
|
||||
<td class="text-left" title="ACL协议及VRRP协议原理及配置.mp4">
|
||||
ACL协议及VRRP协议原理及配置.mp4
|
||||
<span onclick="GoToSource('/knowledge/video/49f4d52d7011418492cd61e4615567d7.html','SingleStudy','49f4d52d-7011-4184-92cd-61e4615567d7')"></span>
|
||||
</td>
|
||||
<td class="text-center">111</td>
|
||||
<td class="text-center">2026-11-19 01:51</td>
|
||||
</tr>
|
||||
"""
|
||||
assert period_cards(html) == {"year": "10209", "month": "126", "total": "24522"}
|
||||
rows = history_rows_from_page(html)
|
||||
assert rows[0]["minutes"] == 111
|
||||
assert rows[0]["title"].startswith("ACL协议")
|
||||
|
||||
|
||||
def test_study_history_parses_period_table() -> None:
|
||||
from euniv.client import EunivClient
|
||||
|
||||
|
||||
Reference in New Issue
Block a user