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
971e7b6c
Commit
971e7b6c
authored
Aug 05, 2013
by
yihua.huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add core
parent
619a12b3
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
7 additions
and
3 deletions
+7
-3
ExtractBy.java
.../src/main/java/us/codecraft/webmagic/model/ExtractBy.java
+1
-0
ExtractByUrl.java
...c/main/java/us/codecraft/webmagic/model/ExtractByUrl.java
+1
-0
HelpUrl.java
...re/src/main/java/us/codecraft/webmagic/model/HelpUrl.java
+1
-0
TargetUrl.java
.../src/main/java/us/codecraft/webmagic/model/TargetUrl.java
+1
-0
DoubleKeyMap.java
...c/main/java/us/codecraft/webmagic/utils/DoubleKeyMap.java
+1
-1
MultiKeyMapBase.java
...ain/java/us/codecraft/webmagic/utils/MultiKeyMapBase.java
+1
-1
News163.java
...ain/java/us/codecraft/webmagic/model/samples/News163.java
+1
-1
No files found.
webmagic-core/src/main/java/us/codecraft/webmagic/model/ExtractBy.java
View file @
971e7b6c
...
@@ -5,6 +5,7 @@ import java.lang.annotation.Retention;
...
@@ -5,6 +5,7 @@ import java.lang.annotation.Retention;
import
java.lang.annotation.Target
;
import
java.lang.annotation.Target
;
/**
/**
* 定义类或者字段的抽取规则。<br>
* @author code4crafter@gmail.com <br>
* @author code4crafter@gmail.com <br>
* @date: 13-8-1 <br>
* @date: 13-8-1 <br>
* Time: 下午8:40 <br>
* Time: 下午8:40 <br>
...
...
webmagic-core/src/main/java/us/codecraft/webmagic/model/ExtractByUrl.java
View file @
971e7b6c
...
@@ -5,6 +5,7 @@ import java.lang.annotation.Retention;
...
@@ -5,6 +5,7 @@ import java.lang.annotation.Retention;
import
java.lang.annotation.Target
;
import
java.lang.annotation.Target
;
/**
/**
* 定义类或者字段的抽取规则(从url中抽取,只支持正则表达式)。<br>
* @author code4crafter@gmail.com <br>
* @author code4crafter@gmail.com <br>
* @date: 13-8-1 <br>
* @date: 13-8-1 <br>
* Time: 下午8:40 <br>
* Time: 下午8:40 <br>
...
...
webmagic-core/src/main/java/us/codecraft/webmagic/model/HelpUrl.java
View file @
971e7b6c
...
@@ -5,6 +5,7 @@ import java.lang.annotation.Retention;
...
@@ -5,6 +5,7 @@ import java.lang.annotation.Retention;
import
java.lang.annotation.Target
;
import
java.lang.annotation.Target
;
/**
/**
* 定义辅助爬取的url。<br>
* @author code4crafter@gmail.com <br>
* @author code4crafter@gmail.com <br>
* @date: 13-8-1 <br>
* @date: 13-8-1 <br>
* Time: 下午8:40 <br>
* Time: 下午8:40 <br>
...
...
webmagic-core/src/main/java/us/codecraft/webmagic/model/TargetUrl.java
View file @
971e7b6c
...
@@ -5,6 +5,7 @@ import java.lang.annotation.Retention;
...
@@ -5,6 +5,7 @@ import java.lang.annotation.Retention;
import
java.lang.annotation.Target
;
import
java.lang.annotation.Target
;
/**
/**
* 定义某个类抽取的范围和来源,sourceRegion可以用xpath语法限定抽取区域。<br>
* @author code4crafter@gmail.com <br>
* @author code4crafter@gmail.com <br>
* @date: 13-8-1 <br>
* @date: 13-8-1 <br>
* Time: 下午8:40 <br>
* Time: 下午8:40 <br>
...
...
webmagic-core/src/main/java/us/codecraft/webmagic/utils/DoubleKeyMap.java
View file @
971e7b6c
...
@@ -3,7 +3,7 @@ package us.codecraft.webmagic.utils;
...
@@ -3,7 +3,7 @@ package us.codecraft.webmagic.utils;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
* @author
yihua.huang@dianping
.com
* @author
code4crafter@gmail
.com
* @date Dec 14, 2012
* @date Dec 14, 2012
*/
*/
public
class
DoubleKeyMap
<
K1
,
K2
,
V
>
extends
MultiKeyMapBase
{
public
class
DoubleKeyMap
<
K1
,
K2
,
V
>
extends
MultiKeyMapBase
{
...
...
webmagic-core/src/main/java/us/codecraft/webmagic/utils/MultiKeyMapBase.java
View file @
971e7b6c
package
us
.
codecraft
.
webmagic
.
utils
;
package
us
.
codecraft
.
webmagic
.
utils
;
/**
/**
* @author
yihua.huang@dianping
.com
* @author
code4crafter@gmail
.com
* @date Dec 14, 2012
* @date Dec 14, 2012
*/
*/
...
...
webmagic-samples/src/main/java/us/codecraft/webmagic/model/samples/News163.java
View file @
971e7b6c
...
@@ -46,7 +46,7 @@ public class News163 implements PagedModel, AfterExtractor {
...
@@ -46,7 +46,7 @@ public class News163 implements PagedModel, AfterExtractor {
@Override
@Override
public
String
getPage
()
{
public
String
getPage
()
{
if
(
page
==
null
)
{
if
(
page
==
null
)
{
return
"
0
"
;
return
"
1
"
;
}
}
return
page
;
return
page
;
}
}
...
...
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