for release
parent
d60615f503
commit
f45e2f118b
4
pom.xml
4
pom.xml
|
@ -6,7 +6,7 @@
|
||||||
<version>7</version>
|
<version>7</version>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>us.codecraft</groupId>
|
<groupId>us.codecraft</groupId>
|
||||||
<version>0.6.1-SNAPSHOT</version>
|
<version>0.6.1</version>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<properties>
|
<properties>
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
<connection>scm:git:git@github.com:code4craft/webmagic.git</connection>
|
<connection>scm:git:git@github.com:code4craft/webmagic.git</connection>
|
||||||
<developerConnection>scm:git:git@github.com:code4craft/webmagic.git</developerConnection>
|
<developerConnection>scm:git:git@github.com:code4craft/webmagic.git</developerConnection>
|
||||||
<url>git@github.com:code4craft/webmagic.git</url>
|
<url>git@github.com:code4craft/webmagic.git</url>
|
||||||
<tag>webmagic-parent-0.6.0</tag>
|
<tag>webmagic-parent-0.6.1</tag>
|
||||||
</scm>
|
</scm>
|
||||||
<licenses>
|
<licenses>
|
||||||
<license>
|
<license>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>us.codecraft</groupId>
|
<groupId>us.codecraft</groupId>
|
||||||
<artifactId>webmagic-parent</artifactId>
|
<artifactId>webmagic-parent</artifactId>
|
||||||
<version>0.6.1-SNAPSHOT</version>
|
<version>0.6.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>us.codecraft</groupId>
|
<groupId>us.codecraft</groupId>
|
||||||
<artifactId>webmagic-parent</artifactId>
|
<artifactId>webmagic-parent</artifactId>
|
||||||
<version>0.6.1-SNAPSHOT</version>
|
<version>0.6.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,7 @@ public class PhantomJSDownloader extends AbstractDownloader {
|
||||||
* /usr/local/bin/phantomjs 命令的绝对路径,避免因系统环境变量引起的IOException
|
* /usr/local/bin/phantomjs 命令的绝对路径,避免因系统环境变量引起的IOException
|
||||||
*
|
*
|
||||||
* @param phantomJsCommand
|
* @param phantomJsCommand
|
||||||
|
* @return this
|
||||||
*/
|
*/
|
||||||
public PhantomJSDownloader(String phantomJsCommand) {
|
public PhantomJSDownloader(String phantomJsCommand) {
|
||||||
this.initPhantomjsCrawlPath();
|
this.initPhantomjsCrawlPath();
|
||||||
|
@ -47,7 +48,7 @@ public class PhantomJSDownloader extends AbstractDownloader {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增构造函数,支持crawl.js路径自定义,因为当其他项目依赖此jar包时,runtime.exec()执行phantomjs命令时无使用法jar包中的crawl.js
|
* 新增构造函数,支持crawl.js路径自定义,因为当其他项目依赖此jar包时,runtime.exec()执行phantomjs命令时无使用法jar包中的crawl.js
|
||||||
*
|
* <pre>
|
||||||
* crawl.js start -->>
|
* crawl.js start -->>
|
||||||
*
|
*
|
||||||
* var system = require('system');
|
* var system = require('system');
|
||||||
|
@ -69,13 +70,15 @@ public class PhantomJSDownloader extends AbstractDownloader {
|
||||||
* });
|
* });
|
||||||
*
|
*
|
||||||
* <<-- crawl.js end
|
* <<-- crawl.js end
|
||||||
|
* </pre>
|
||||||
* 具体项目时可以将以上js代码复制下来使用
|
* 具体项目时可以将以上js代码复制下来使用
|
||||||
*
|
*
|
||||||
* example:
|
* example:
|
||||||
* new PhantomJSDownloader("/your/path/phantomjs", "/your/path/crawl.js");
|
* new PhantomJSDownloader("/your/path/phantomjs", "/your/path/crawl.js");
|
||||||
*
|
*
|
||||||
* @param phantomJsCommand
|
* @param phantomJsCommand phantomJsCommand
|
||||||
* @param crawlJsPath
|
* @param crawlJsPath crawlJsPath
|
||||||
|
* @return this
|
||||||
*/
|
*/
|
||||||
public PhantomJSDownloader(String phantomJsCommand, String crawlJsPath) {
|
public PhantomJSDownloader(String phantomJsCommand, String crawlJsPath) {
|
||||||
PhantomJSDownloader.phantomJsCommand = phantomJsCommand;
|
PhantomJSDownloader.phantomJsCommand = phantomJsCommand;
|
||||||
|
|
|
@ -45,7 +45,7 @@ public class SpiderMonitor {
|
||||||
*
|
*
|
||||||
* @param spiders spiders
|
* @param spiders spiders
|
||||||
* @return this
|
* @return this
|
||||||
* @throws JMException
|
* @throws JMException JMException
|
||||||
*/
|
*/
|
||||||
public synchronized SpiderMonitor register(Spider... spiders) throws JMException {
|
public synchronized SpiderMonitor register(Spider... spiders) throws JMException {
|
||||||
for (Spider spider : spiders) {
|
for (Spider spider : spiders) {
|
||||||
|
|
|
@ -102,7 +102,7 @@ public class DoubleKeyMap<K1, K2, V> extends MultiKeyMapBase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param key1 key1
|
* @param key1 key1
|
||||||
* @return
|
* @return map
|
||||||
*/
|
*/
|
||||||
public Map<K2, V> remove(K1 key1) {
|
public Map<K2, V> remove(K1 key1) {
|
||||||
Map<K2, V> remove = map.remove(key1);
|
Map<K2, V> remove = map.remove(key1);
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>webmagic-parent</artifactId>
|
<artifactId>webmagic-parent</artifactId>
|
||||||
<groupId>us.codecraft</groupId>
|
<groupId>us.codecraft</groupId>
|
||||||
<version>0.6.1-SNAPSHOT</version>
|
<version>0.6.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>webmagic-parent</artifactId>
|
<artifactId>webmagic-parent</artifactId>
|
||||||
<groupId>us.codecraft</groupId>
|
<groupId>us.codecraft</groupId>
|
||||||
<version>0.6.1-SNAPSHOT</version>
|
<version>0.6.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>webmagic-parent</artifactId>
|
<artifactId>webmagic-parent</artifactId>
|
||||||
<groupId>us.codecraft</groupId>
|
<groupId>us.codecraft</groupId>
|
||||||
<version>0.6.1-SNAPSHOT</version>
|
<version>0.6.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>webmagic-parent</artifactId>
|
<artifactId>webmagic-parent</artifactId>
|
||||||
<groupId>us.codecraft</groupId>
|
<groupId>us.codecraft</groupId>
|
||||||
<version>0.6.1-SNAPSHOT</version>
|
<version>0.6.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue