修复HDU,POJ题目图片显示问题
This commit is contained in:
parent
8dab12a089
commit
bd19622380
|
@ -37,7 +37,8 @@ public class HDUProblemStrategy extends ProblemStrategy {
|
||||||
info.setTitle(ReUtil.get("color:#1A5CC8\">([\\s\\S]*?)</h1>", html, 1).trim());
|
info.setTitle(ReUtil.get("color:#1A5CC8\">([\\s\\S]*?)</h1>", html, 1).trim());
|
||||||
info.setTimeLimit(Integer.parseInt(ReUtil.get("(\\d*) MS", html, 1)));
|
info.setTimeLimit(Integer.parseInt(ReUtil.get("(\\d*) MS", html, 1)));
|
||||||
info.setMemoryLimit(Integer.parseInt(ReUtil.get("/(\\d*) K", html, 1)) / 1024);
|
info.setMemoryLimit(Integer.parseInt(ReUtil.get("/(\\d*) K", html, 1)) / 1024);
|
||||||
info.setDescription(ReUtil.get(">Problem Description</div> <div class=.*?>([\\s\\S]*?)</div>", html, 1).replaceAll("src=\"../../", "src=\"" + HOST + "/"));
|
info.setDescription(ReUtil.get(">Problem Description</div> <div class=.*?>([\\s\\S]*?)</div>", html, 1)
|
||||||
|
.replaceAll("src=\"", "src=\"" + HOST));
|
||||||
info.setInput(ReUtil.get(">Input</div> <div class=.*?>([\\s\\S]*?)</div>", html, 1));
|
info.setInput(ReUtil.get(">Input</div> <div class=.*?>([\\s\\S]*?)</div>", html, 1));
|
||||||
info.setOutput(ReUtil.get(">Output</div> <div class=.*?>([\\s\\S]*?)</div>", html, 1));
|
info.setOutput(ReUtil.get(">Output</div> <div class=.*?>([\\s\\S]*?)</div>", html, 1));
|
||||||
StringBuilder sb = new StringBuilder("<input>");
|
StringBuilder sb = new StringBuilder("<input>");
|
||||||
|
@ -47,7 +48,7 @@ public class HDUProblemStrategy extends ProblemStrategy {
|
||||||
info.setExamples(sb.toString());
|
info.setExamples(sb.toString());
|
||||||
info.setHint(ReUtil.get("<i>Hint</i></div>([\\s\\S]*?)</div><i .*?<br><[^<>]*?panel_title[^<>]*?>", html, 1));
|
info.setHint(ReUtil.get("<i>Hint</i></div>([\\s\\S]*?)</div><i .*?<br><[^<>]*?panel_title[^<>]*?>", html, 1));
|
||||||
info.setIsRemote(true);
|
info.setIsRemote(true);
|
||||||
info.setSource(String.format("<a style='color:#1A5CC8' href='http://acm.hdu.edu.cn/showproblem.php?pid=%s'>%s</a>", problemId, JUDGE_NAME + "-" + problemId));
|
info.setSource(String.format("<a style='color:#1A5CC8' href='https://acm.hdu.edu.cn/showproblem.php?pid=%s'>%s</a>", problemId, JUDGE_NAME + "-" + problemId));
|
||||||
info.setType(0)
|
info.setType(0)
|
||||||
.setAuth(1)
|
.setAuth(1)
|
||||||
.setAuthor(author)
|
.setAuthor(author)
|
||||||
|
|
|
@ -34,7 +34,7 @@ public class POJProblemStrategy extends ProblemStrategy {
|
||||||
info.setTimeLimit(Integer.parseInt(ReUtil.get("<b>Time Limit:</b> (\\d{3,})MS</td>", html, 1)));
|
info.setTimeLimit(Integer.parseInt(ReUtil.get("<b>Time Limit:</b> (\\d{3,})MS</td>", html, 1)));
|
||||||
info.setMemoryLimit(Integer.parseInt(ReUtil.get("<b>Memory Limit:</b> (\\d{2,})K</td>", html, 1)) / 1024);
|
info.setMemoryLimit(Integer.parseInt(ReUtil.get("<b>Memory Limit:</b> (\\d{2,})K</td>", html, 1)) / 1024);
|
||||||
info.setDescription(ReUtil.get("<p class=\"pst\">Description</p><div class=.*?>([\\s\\S]*?)</div><p class=\"pst\">", html, 1)
|
info.setDescription(ReUtil.get("<p class=\"pst\">Description</p><div class=.*?>([\\s\\S]*?)</div><p class=\"pst\">", html, 1)
|
||||||
.replaceAll("src=\"../../", "src=\"" + HOST + "/"));
|
.replaceAll("src=\"", "src=\"" + HOST + "/"));
|
||||||
|
|
||||||
info.setInput(ReUtil.get("<p class=\"pst\">Input</p><div class=.*?>([\\s\\S]*?)</div><p class=\"pst\">", html, 1));
|
info.setInput(ReUtil.get("<p class=\"pst\">Input</p><div class=.*?>([\\s\\S]*?)</div><p class=\"pst\">", html, 1));
|
||||||
info.setOutput(ReUtil.get("<p class=\"pst\">Output</p><div class=.*?>([\\s\\S]*?)</div><p class=\"pst\">", html, 1));
|
info.setOutput(ReUtil.get("<p class=\"pst\">Output</p><div class=.*?>([\\s\\S]*?)</div><p class=\"pst\">", html, 1));
|
||||||
|
|
Loading…
Reference in New Issue