remove useless code
parent
6e32a19f80
commit
e046bb0723
|
@ -15,7 +15,7 @@ public class ResultItemsCollectorPipeline implements CollectorPipeline<ResultIte
|
|||
private List<ResultItems> collector = new ArrayList<ResultItems>();
|
||||
|
||||
@Override
|
||||
public void process(ResultItems resultItems, Task task) {
|
||||
public synchronized void process(ResultItems resultItems, Task task) {
|
||||
collector.add(resultItems);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
package us.codecraft.webmagic.model.annotation;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Define the url patterns for class. <br>
|
||||
* All urls matching the pattern will be crawled and extracted for new objects. <br>
|
||||
*
|
||||
* @author code4crafter@gmail.com <br>
|
||||
* @since 0.3.3
|
||||
*/
|
||||
@Retention(java.lang.annotation.RetentionPolicy.RUNTIME)
|
||||
@Target({ElementType.TYPE})
|
||||
public @interface UrlTemplate {
|
||||
|
||||
/**
|
||||
* The url patterns for class.<br>
|
||||
* Use regex expression with some changes: <br>
|
||||
* "." stand for literal character "." instead of "any character". <br>
|
||||
* "*" stand for any legal character for url in 0-n length ([^"'#]*) instead of "any length". <br>
|
||||
*
|
||||
* @return the url patterns for class
|
||||
*/
|
||||
String value();
|
||||
|
||||
/**
|
||||
* Define the region for url extracting. <br>
|
||||
* Only support XPath.<br>
|
||||
* When sourceRegion is set, the urls will be extracted only from the region instead of entire content. <br>
|
||||
*
|
||||
* @return the region for url extracting
|
||||
*/
|
||||
String encoding() default "utf8";
|
||||
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
package us.codecraft.webmagic.model.direct;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
/**
|
||||
* @author code4crafter@gmail.com
|
||||
*/
|
||||
public class Param extends LinkedHashMap<String,Object>{
|
||||
|
||||
@Override
|
||||
public Param put(String key, Object value) {
|
||||
super.put(key, value);
|
||||
return this;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue