fix: 题面提取结束标记改为medium-3侧栏
这个提交包含在:
@@ -259,7 +259,7 @@ class HydroAdapter(BaseJudgeEngine):
|
|||||||
m = re.search(r'<h1 class="section__title">(.*?)</h1>', html, re.S)
|
m = re.search(r'<h1 class="section__title">(.*?)</h1>', html, re.S)
|
||||||
title = self._strip_html(m.group(1)).strip() if m else ""
|
title = self._strip_html(m.group(1)).strip() if m else ""
|
||||||
title = re.sub(r'^#P\d+\.\s*', '', title) # 去掉面包屑 "#P142. " 前缀
|
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 ""
|
content = self._strip_html(m.group(1)).strip() if m else ""
|
||||||
return {"pid": str(pid), "title": title, "difficulty": 0, "content": content}
|
return {"pid": str(pid), "title": title, "difficulty": 0, "content": content}
|
||||||
|
|
||||||
|
|||||||
在新工单中引用
屏蔽一个用户