Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
webmagic
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
沈俊林
webmagic
Commits
e046bb07
Commit
e046bb07
authored
Nov 06, 2013
by
yihua.huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove useless code
parent
6e32a19f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
53 deletions
+1
-53
ResultItemsCollectorPipeline.java
...craft/webmagic/pipeline/ResultItemsCollectorPipeline.java
+1
-1
UrlTemplate.java
...a/us/codecraft/webmagic/model/annotation/UrlTemplate.java
+0
-37
Param.java
...c/main/java/us/codecraft/webmagic/model/direct/Param.java
+0
-15
No files found.
webmagic-core/src/main/java/us/codecraft/webmagic/pipeline/ResultItemsCollectorPipeline.java
View file @
e046bb07
...
...
@@ -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
);
}
...
...
webmagic-extension/src/main/java/us/codecraft/webmagic/model/annotation/UrlTemplate.java
deleted
100644 → 0
View file @
6e32a19f
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"
;
}
webmagic-extension/src/main/java/us/codecraft/webmagic/model/direct/Param.java
deleted
100644 → 0
View file @
6e32a19f
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
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment