Skip to content

Commit

Permalink
代码优化
Browse files Browse the repository at this point in the history
  • Loading branch information
javamxd committed Apr 11, 2020
1 parent ce4bdf7 commit ed4ec48
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public Class<?> support() {
@Comment("将请求结果转为Element对象")
@Example("${resp.element()}")
public static Element element(SpiderResponse response) {
return Jsoup.parse(response.getHtml());
return Jsoup.parse(response.getHtml(),response.getUrl());
}

@Comment("根据xpath在请求结果中查找")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ public Class<?> support() {
@Example("${rs.nextToMap()}")
public static Map<String, Object> nextToMap(SqlRowSet sqlRowSet) {
try {
boolean next = sqlRowSet.next();
if (!next) {
if (!sqlRowSet.next()) {
return null;
}
String[] columnNames = sqlRowSet.getMetaData().getColumnNames();
Expand Down

0 comments on commit ed4ec48

Please sign in to comment.