Commit Graph

599 Commits (884f51ba3bf336cc79b1487ca4faef644fe4bd76)

Author SHA1 Message Date
Sutra Zhou 34da2fb3a0 Make PageProcessor#getSite be default method. Closes #1040. 2021-10-24 23:20:38 +08:00
carl.don:tjr fcdb9074d6 格式化 Spider.run 代码 2021-08-04 18:23:04 +08:00
carl.don:tjr ab5d81a6b6 perfect Spider.run to avoid some rare concurrent issue, change the Spider.emptySleepTime to long type 2021-08-04 17:17:22 +08:00
Sutra Zhou c5a037a807 Update for next development version 2021-07-22 13:02:46 +08:00
Sutra Zhou 4e51a4f68b Update versions for release 2021-07-22 12:42:55 +08:00
Sutra Zhou be6f5ff771 Add missing @Deprecated annotations. 2021-03-22 18:21:59 +08:00
Sutra Zhou 4e8a086dae Pass exception to onError. Fixes #1005. 2021-03-22 18:21:10 +08:00
Sutra Zhou d0e2776991 Upgrade xsoup from 0.3.1 to 0.3.2. 2021-01-10 14:10:32 +08:00
Sutra Zhou 0e01550a79 Upgrade dependencies, including the jedis from 2.9.3 to 3.4.1. 2021-01-06 03:21:10 +08:00
Sutra Zhou ab6ff7f809 Revert "pageCount修改"
This reverts commit 9a71f0ac92.
2021-01-02 20:33:32 +08:00
Sutra Zhou 30daec4803 Revert "提供出现某种异常刷新代理,异常可配置"
This reverts commit 4a6441e7c5.
2021-01-02 20:33:17 +08:00
Sutra Zhou d0843bee0d Revert "简化代码"
This reverts commit 9cc5287743.
2021-01-02 20:32:35 +08:00
Sutra Zhou 5ceccc62e0 Revert "提供异常刷新httpClient,异常可配置,重写getHttpClient代码"
This reverts commit 19465089c3.
2021-01-02 20:31:53 +08:00
Sutra Zhou 33e3fcdf22 Revert "代理接口的修改,提供刷星代理API。downloader 下载错误时,提供request,exception,proxyProvider三个参数,"
This reverts commit ba69eba669.
2021-01-02 20:27:28 +08:00
Sutra Zhou c489647c4b Revert " Downloader 提供刷新组件的api,方便在spider中操作"
This reverts commit 2e2a0fdf3e.
2021-01-02 20:15:10 +08:00
Sutra Zhou 4bedd97267 Revert " 刷新代理api重构,需要提供旧代理,如果依然是旧代理,才进行刷新,防止应延迟响应造成的过度刷新"
This reverts commit 0aa2c3949d.
2021-01-02 20:14:02 +08:00
Sutra Zhou 3f756c9325 Revert " 代理功能扩展,对原代理提供商进行拆分,加入lombok"
This reverts commit 33906e36f4.
2021-01-02 20:14:01 +08:00
Sutra Zhou aabc5584b8 Revert " bug修改,对结果提供缓存能力"
This reverts commit f68795d7dd.
2021-01-02 20:13:53 +08:00
Sutra Zhou 328c3e0d7d Remove useless imports to fix build. 2021-01-02 19:41:05 +08:00
Sutra Zhou 1d536cf705
Merge pull request #976 from yaoqiangpersonal/master
主要是对代理的功能进行了增加和修改
2020-12-29 17:27:42 +08:00
yao f68795d7dd bug修改,对结果提供缓存能力 2020-12-29 16:54:38 +08:00
yao 33906e36f4 代理功能扩展,对原代理提供商进行拆分,加入lombok 2020-12-29 16:18:43 +08:00
yao 0aa2c3949d 刷新代理api重构,需要提供旧代理,如果依然是旧代理,才进行刷新,防止应延迟响应造成的过度刷新 2020-12-22 18:19:37 +08:00
yao 2e2a0fdf3e Downloader 提供刷新组件的api,方便在spider中操作 2020-12-21 18:08:55 +08:00
yao 19465089c3 提供异常刷新httpClient,异常可配置,重写getHttpClient代码 2020-12-21 16:02:35 +08:00
yao 9cc5287743 简化代码 2020-12-21 14:58:01 +08:00
yao 4a6441e7c5 提供出现某种异常刷新代理,异常可配置 2020-12-21 14:52:25 +08:00
yao ba69eba669 代理接口的修改,提供刷星代理API。downloader 下载错误时,提供request,exception,proxyProvider三个参数, 2020-12-21 14:36:44 +08:00
itranlin fc7ae9ce28 子任务可以使用不同的下载器。。。 2020-12-19 17:59:52 +08:00
yao 9a71f0ac92 pageCount修改 2020-12-15 17:05:16 +08:00
Sutra Zhou 4b902270b4 Bump version number from 0.7.3 to 0.7.4. 2020-10-27 09:01:21 +08:00
Sutra Zhou b4b1df85a0 Fix TLSv1.3. Maybe we should expose a API to allow user to use org.apache.http.ssl.SSLContextBuilder. Fixes #948. 2020-09-21 17:48:59 +08:00
leeyazhou 9aab25f339 build: manage plugin version & remove build WARNING
## use the new dependency of commons-io

[WARNING] The artifact org.apache.commons:commons-io:jar:1.3.2 has been
relocated to commons-io:commons-io:jar:1.3.2

## manage plugin version of maven-jar-plugin and maven-deploy-plugin

[WARNING]
[WARNING] Some problems were encountered while building the effective
model for us.codecraft:webmagic-core:jar:0.7.3
[WARNING] 'build.plugins.plugin.version' for
org.apache.maven.plugins:maven-jar-plugin is missing. @
us.codecraft:webmagic-parent:0.7.3, /opt/code/git/webmagic/pom.xml, line
263, column 21
[WARNING]
[WARNING] Some problems were encountered while building the effective
model for us.codecraft:webmagic-extension:jar:0.7.3
[WARNING] 'build.plugins.plugin.version' for
org.apache.maven.plugins:maven-jar-plugin is missing. @
us.codecraft:webmagic-parent:0.7.3, /opt/code/git/webmagic/pom.xml, line
263, column 21
[WARNING]
[WARNING] Some problems were encountered while building the effective
model for us.codecraft:webmagic-scripts:jar:0.7.3
[WARNING] 'build.plugins.plugin.version' for
org.apache.maven.plugins:maven-jar-plugin is missing. @ line 61, column
21
[WARNING]
[WARNING] Some problems were encountered while building the effective
model for us.codecraft:webmagic-selenium:jar:0.7.3
[WARNING] 'build.plugins.plugin.version' for
org.apache.maven.plugins:maven-jar-plugin is missing. @
us.codecraft:webmagic-parent:0.7.3, /opt/code/git/webmagic/pom.xml, line
263, column 21
[WARNING] 'build.plugins.plugin.version' for
org.apache.maven.plugins:maven-deploy-plugin is missing. @ line 34,
column 12
[WARNING]
[WARNING] Some problems were encountered while building the effective
model for us.codecraft:webmagic-saxon:jar:0.7.3
[WARNING] 'build.plugins.plugin.version' for
org.apache.maven.plugins:maven-jar-plugin is missing. @
us.codecraft:webmagic-parent:0.7.3, /opt/code/git/webmagic/pom.xml, line
263, column 21
[WARNING] 'build.plugins.plugin.version' for
org.apache.maven.plugins:maven-deploy-plugin is missing. @ line 34,
column 21
[WARNING]
[WARNING] Some problems were encountered while building the effective
model for us.codecraft:webmagic-samples:jar:0.7.3
[WARNING] 'build.plugins.plugin.version' for
org.apache.maven.plugins:maven-jar-plugin is missing. @
us.codecraft:webmagic-parent:0.7.3, /opt/code/git/webmagic/pom.xml, line
263, column 21
[WARNING]
[WARNING] Some problems were encountered while building the effective
model for us.codecraft:webmagic-parent:pom:0.7.3
[WARNING] 'build.plugins.plugin.version' for
org.apache.maven.plugins:maven-jar-plugin is missing. @ line 263, column
21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they
threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support
building such malformed projects.
2020-08-07 16:36:32 +08:00
Sutra Zhou 48bc73fbff New method Proxy#create. 2020-06-24 13:43:16 +08:00
Sutra Zhou 6d3f2d9b64 Wrap URISyntaxException as IllegalArgumentException for Proxy#toURI. 2020-06-24 13:24:45 +08:00
Sutra Zhou 236e5ade44 Update Proxy#toString(). 2020-06-17 11:19:37 +08:00
Sutra Zhou 791323a5b0 Add Proxy#scheme. 2020-06-16 14:45:29 +08:00
Sutra Zhou 2413366adb Format code, no actual code changed. 2020-06-15 20:01:14 +08:00
Sutra Zhou 7945c0612d Merge branch 'master' of github.com:code4craft/webmagic 2020-05-30 02:10:25 +08:00
Sutra Zhou 71aa04c89f Upgrade dependencies. 2020-05-30 02:10:01 +08:00
Sutra Zhou f24410d7bf
Merge pull request #885 from Diffblue-benchmarks/add-NumberUtils-tests
Add unit tests for us.codecraft.webmagic.utils.NumberUtils
2020-05-29 14:49:12 +08:00
Sutra Zhou ab5ac9d796 Fix test failure and javadoc failure. 2020-05-28 19:05:17 +08:00
Sutra Zhou 4078766d0e Change log level of supportedProtocols. 2020-05-28 14:30:14 +08:00
Sutra Zhou 3e42523141 TLSv1.3 requires Java 11 at least. Fixes #927. 2020-05-28 14:14:16 +08:00
Sutra Zhou 436af97346 Use spaces as indent. 2020-05-28 13:59:05 +08:00
Sutra Zhou ba1b4017a7 Mark slf4j-log4j12 as optional. 2020-05-21 19:59:29 +08:00
Sutra Zhou e7476cb8dc Make Request#getExtra be generic. 2020-04-19 22:44:06 +08:00
Sutra Zhou c46400d126 Fix javadoc of sleep time. Fixes #918. 2020-04-12 01:30:57 +08:00
Sutra Zhou fe3d52e2a4 Add TLSv1.3 support. 2020-04-11 18:00:04 +08:00
Thomas Perkins 2fd0e192fd Add unit tests for us.codecraft.webmagic.utils.NumberUtils
These tests were written using Diffblue Cover.
2019-07-30 09:58:54 +01:00
yihua.huang e5db538c19 #647 remove ThreadSafe annotation 2017-11-29 13:49:40 +08:00
yihua.huang b539522ca8 #701 support to tls1.2 2017-11-29 13:36:19 +08:00
yihua.huang e276b11ea9 vesion 0.7.3 2017-07-30 15:29:22 +08:00
王侃 a7e3090711 setBinaryContent, setCharset 方法返回this, 方便链式调用 2017-07-29 19:07:40 +08:00
yihua.huang 6f5b9e448e #627 set charset to request 2017-07-29 11:27:56 +08:00
yihua.huang 32f1f2cf44 #613 add charset to page 2017-07-29 11:16:09 +08:00
yihua.huang 65049baca4 #571 fix spell mistake 2017-07-29 11:06:17 +08:00
yihua.huang f375b9fdba #629 fix ut 2017-07-25 18:27:10 +08:00
yihua.huang 3266ea15ca #629 correct illegal url in HttpUriRequestConverter 2017-07-22 17:40:43 +08:00
yihua.huang 5daf92e8b2 #610 CASE_INSENSITIVE for charset detect in Content-Type 2017-07-22 17:27:36 +08:00
yihua.huang 2183ba9b61 #571 add getBytes to Page 2017-07-22 12:11:00 +08:00
yihua.huang c3bdb20458 #631 remove IllegalArgumentException of HttpRequestBody.json and so on 2017-07-22 11:49:23 +08:00
yihua.huang f405e642c0 add default constructor for HttpRequestBody #609 2017-06-24 11:31:17 +08:00
yihua.huang eb376fca74 update jsoup to 1.10.3 #608 2017-06-24 11:29:35 +08:00
yihua.huang faca38d4ec update jsonpath to 2.2.0 #606 2017-06-24 11:01:23 +08:00
yihua.huang 1b6394bef9 version 0.7.2 2017-06-17 16:10:10 +08:00
yihua.huang 3ee00015c2 change header from Authorization to Proxy-Authorization for Proxy Authorization #596 2017-06-17 16:08:39 +08:00
yihua.huang 4111b07263 more error log on page code error #601 2017-06-17 10:36:41 +08:00
yihua.huang 6bd1eed25e fix duplicate call of onSuccess and onError #605 2017-06-17 10:26:55 +08:00
yihua.huang 3a589d4ca6 HttpRequestBody implements Serializable #594 2017-06-08 15:59:46 +08:00
yihua.huang 13cdf82695 update version to 0.7.2-SNAPSHOT 2017-06-05 16:55:59 +08:00
yihua.huang 1e9187f24e version 0.7.1 2017-06-04 07:52:54 +08:00
yihua.huang 592fa2c0f1 add site header test 2017-06-03 11:56:18 +08:00
yihua.huang 19d34dbb65 not add bracket to regex in RegexSelector #559 2017-06-03 11:30:07 +08:00
Yihua Huang b6b991a09b Merge pull request #556 from zhuyuesut/master
增加对零宽断言的支持
2017-06-03 11:10:56 +08:00
yihua.huang bb0eb69acf update ZhihuPageProcessor example 2017-06-03 10:42:17 +08:00
yihua.huang 2e35e149be for 0.7.1 2017-05-29 14:41:49 +08:00
yihua.huang 17d8bfa907 docs and pgp version 2017-05-29 09:36:42 +08:00
yihua.huang 17478fcfc4 0.7.0 release 2017-05-29 09:30:56 +08:00
yihua.huang 636359300f add Site.disableCookieManagement #577 2017-05-29 08:29:53 +08:00
yihua.huang 49de9374cd new SimpleHttpClient #576 2017-05-27 17:30:19 +08:00
yihua.huang 8999ea9320 add public constructor for SimpleProxyProvider 2017-05-27 16:09:02 +08:00
yihua.huang a8c2e6c729 alpha release 2017-05-20 12:51:16 +08:00
yihua.huang 3c1338193b for 0.7.0.alpha 2017-05-20 12:34:09 +08:00
yihua.huang e8abc28072 #552 add some log when crawler stop 2017-05-20 11:44:51 +08:00
zhuyue 9e1b7ed3f7 Update RegexSelector.java 2017-05-05 10:47:10 +08:00
zhuyue c80f25edbd Update RegexSelectorTest.java
简单的增加了一点测试
2017-05-03 18:33:23 +08:00
zhuyue c3183252ac Update RegexSelector.java 2017-05-03 18:24:19 +08:00
yihua.huang cbf80af5dd test for SimpleProxyProvider #535 2017-04-16 10:50:27 +08:00
yihua.huang eb632a93d3 SimpleProxyProvider #535 2017-04-16 10:43:56 +08:00
yihua.huang d38d51dfcb fix javadoc 2017-04-15 12:24:50 +08:00
GZhY 5f34adf938 完善 LinksSelector.selectList 的测试用例 2017-04-09 21:29:01 +08:00
GZhY ce3f0ac239 删除 fixAllRelativeHrefs 并修复 SeleniumDownloader 对 fixAllRelativeHrefs 的依赖 2017-04-09 21:01:32 +08:00
GZhY bc6e81e00f 修复checkElementAndConvert方法注释中注释错误 2017-04-09 20:40:00 +08:00
yihua.huang 4a2c0f4f97 add returnProxy for proxyProvider 2017-04-09 09:28:36 +08:00
yihua.huang 1b04a7f2b3 #527 move logic check from downloaderto spider 2017-04-09 09:23:10 +08:00
yihua.huang 0f4d6e8b12 #525 remove port in UrlUtils.getDomain() 2017-04-08 23:17:00 +08:00
yihua.huang a1ae632b62 test for request cookies and headers 2017-04-08 23:13:16 +08:00
yihua.huang db67db8103 #523 remove fixAllRelativeHrefs by default, get absolute urls for links() 2017-04-08 22:06:18 +08:00
yihua.huang abd020b45b some comments 2017-04-08 20:16:17 +08:00