Skip to content

Commit 0dc852e

Browse files
committed
Merge branch 'hotfix/0.10.2'
2 parents 2994716 + 0dbfaf7 commit 0dc852e

File tree

9 files changed

+8
-19
lines changed

9 files changed

+8
-19
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<groupId>us.codecraft</groupId>
4-
<version>0.10.1</version>
4+
<version>0.10.2</version>
55
<modelVersion>4.0.0</modelVersion>
66
<packaging>pom</packaging>
77
<properties>

webmagic-core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<parent>
44
<groupId>us.codecraft</groupId>
55
<artifactId>webmagic-parent</artifactId>
6-
<version>0.10.1</version>
6+
<version>0.10.2</version>
77
</parent>
88
<modelVersion>4.0.0</modelVersion>
99

webmagic-core/src/main/java/us/codecraft/webmagic/downloader/HttpClientDownloader.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
import org.apache.http.client.methods.CloseableHttpResponse;
1313
import org.apache.http.impl.client.CloseableHttpClient;
1414
import org.apache.http.util.EntityUtils;
15-
import org.slf4j.Logger;
16-
import org.slf4j.LoggerFactory;
1715

1816
import us.codecraft.webmagic.Page;
1917
import us.codecraft.webmagic.Request;
@@ -33,8 +31,6 @@
3331
*/
3432
public class HttpClientDownloader extends AbstractDownloader {
3533

36-
private Logger logger = LoggerFactory.getLogger(getClass());
37-
3834
private final Map<String, CloseableHttpClient> httpClients = new HashMap<String, CloseableHttpClient>();
3935

4036
private HttpClientGenerator httpClientGenerator = new HttpClientGenerator();
@@ -84,16 +80,10 @@ public Page download(Request request, Task task) {
8480
try {
8581
httpResponse = httpClient.execute(requestContext.getHttpUriRequest(), requestContext.getHttpClientContext());
8682
page = handleResponse(request, request.getCharset() != null ? request.getCharset() : task.getSite().getCharset(), httpResponse, task);
87-
8883
onSuccess(page, task);
89-
logger.info("Download page success: {}", request.getUrl());
90-
9184
return page;
9285
} catch (IOException e) {
93-
9486
onError(page, task, e);
95-
logger.info("Download page error: {}", request.getUrl(), e);
96-
9787
return page;
9888
} finally {
9989
if (httpResponse != null) {
@@ -138,7 +128,6 @@ private String getHtmlCharset(String contentType, byte[] contentBytes, Task task
138128
String charset = CharsetUtils.detectCharset(contentType, contentBytes);
139129
if (charset == null) {
140130
charset = Optional.ofNullable(task.getSite().getDefaultCharset()).orElseGet(Charset.defaultCharset()::name);
141-
logger.info("Charset autodetect failed, use {} as charset.", task.getSite().getDefaultCharset());
142131
}
143132
return charset;
144133
}

webmagic-coverage/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<parent>
99
<groupId>us.codecraft</groupId>
1010
<artifactId>webmagic-parent</artifactId>
11-
<version>0.10.1</version>
11+
<version>0.10.2</version>
1212
</parent>
1313

1414
<artifactId>webmagic-coverage</artifactId>

webmagic-extension/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<parent>
44
<groupId>us.codecraft</groupId>
55
<artifactId>webmagic-parent</artifactId>
6-
<version>0.10.1</version>
6+
<version>0.10.2</version>
77
</parent>
88
<modelVersion>4.0.0</modelVersion>
99

webmagic-samples/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<parent>
44
<artifactId>webmagic-parent</artifactId>
55
<groupId>us.codecraft</groupId>
6-
<version>0.10.1</version>
6+
<version>0.10.2</version>
77
</parent>
88
<modelVersion>4.0.0</modelVersion>
99

webmagic-saxon/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<parent>
44
<artifactId>webmagic-parent</artifactId>
55
<groupId>us.codecraft</groupId>
6-
<version>0.10.1</version>
6+
<version>0.10.2</version>
77
</parent>
88
<modelVersion>4.0.0</modelVersion>
99

webmagic-scripts/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<parent>
44
<artifactId>webmagic-parent</artifactId>
55
<groupId>us.codecraft</groupId>
6-
<version>0.10.1</version>
6+
<version>0.10.2</version>
77
</parent>
88
<modelVersion>4.0.0</modelVersion>
99

webmagic-selenium/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<parent>
44
<artifactId>webmagic-parent</artifactId>
55
<groupId>us.codecraft</groupId>
6-
<version>0.10.1</version>
6+
<version>0.10.2</version>
77
</parent>
88
<modelVersion>4.0.0</modelVersion>
99

0 commit comments

Comments
 (0)