fix: 题面提取结束标记改为medium-3侧栏

这个提交包含在:
langxm
2026-10-14 20:46:57 +08:00
父节点 eb3efccb3c
当前提交 79e29fe9f1
+1 -1
查看文件
@@ -259,7 +259,7 @@ class HydroAdapter(BaseJudgeEngine):
m = re.search(r'<h1 class="section__title">(.*?)</h1>', html, re.S)
title = self._strip_html(m.group(1)).strip() if m else ""
title = re.sub(r'^#P\d+\.\s*', '', title) # 去掉面包屑 "#P142. " 前缀
m = re.search(r'data-fragment-id="problem-description"[^>]*>(.{200,12000}?)(?=<div class="section|<footer|<div class="problem__aside)', html, re.S)
m = re.search(r'data-fragment-id="problem-description"[^>]*>(.{100,15000}?)(?=<div class="medium-3|<footer|</article>)', html, re.S)
content = self._strip_html(m.group(1)).strip() if m else ""
return {"pid": str(pid), "title": title, "difficulty": 0, "content": content}