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
f4134504
Commit
f4134504
authored
Aug 06, 2013
by
yihua.huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove duplicated class
parent
c7005a02
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
64 deletions
+1
-64
OschinaBlog.java
...rc/test/java/us/codecraft/webmagic/model/OschinaBlog.java
+0
-40
TestFetcher.java
...rc/test/java/us/codecraft/webmagic/model/TestFetcher.java
+0
-24
RedisSchedulerTest.java
...a/us/codecraft/webmagic/scheduler/RedisSchedulerTest.java
+1
-0
No files found.
webmagic-plugin/webmagic-misc/src/test/java/us/codecraft/webmagic/model/OschinaBlog.java
deleted
100644 → 0
View file @
c7005a02
package
us
.
codecraft
.
webmagic
.
model
;
import
us.codecraft.webmagic.Page
;
import
us.codecraft.webmagic.Site
;
import
java.util.List
;
/**
* @author code4crafter@gmail.com <br>
* @date: 13-8-1 <br>
* Time: 下午10:18 <br>
*/
@TargetUrl
(
"http://my.oschina.net/flashsword/blog/*"
)
public
class
OschinaBlog
implements
AfterExtractor
{
@ExtractBy
(
"//title"
)
private
String
title
;
@ExtractBy
(
value
=
"div.BlogContent"
,
type
=
ExtractBy
.
Type
.
Css
)
private
String
content
;
@ExtractBy
(
value
=
"//div[@class='BlogTags']/a/text()"
,
multi
=
true
)
private
List
<
String
>
tags
;
@ExtractBy
(
value
=
"//div[@class='BlogTags']/a/text()"
,
multi
=
true
)
private
List
<
String
>
comments
;
@Override
public
void
afterProcess
(
Page
page
)
{
System
.
out
.
println
(
"title:\t"
+
title
);
System
.
out
.
println
(
"content:\t"
+
content
);
System
.
out
.
println
(
"tags:\t"
+
tags
);
page
.
setSkip
(
true
);
}
public
static
void
main
(
String
[]
args
)
{
OOSpider
.
create
(
Site
.
me
().
addStartUrl
(
"http://my.oschina.net/flashsword/blog/145796"
),
OschinaBlog
.
class
)
.
run
();
}
}
\ No newline at end of file
webmagic-plugin/webmagic-misc/src/test/java/us/codecraft/webmagic/model/TestFetcher.java
deleted
100644 → 0
View file @
c7005a02
package
us
.
codecraft
.
webmagic
.
model
;
import
org.junit.Ignore
;
import
org.junit.Test
;
import
us.codecraft.webmagic.Site
;
/**
* @author code4crafter@gmail.com <br>
* @date: 13-8-1 <br>
* Time: 下午8:42 <br>
*/
public
class
TestFetcher
{
@Ignore
(
"takes long"
)
@Test
public
void
test
()
{
OOSpider
.
create
(
Site
.
me
().
addStartUrl
(
"http://my.oschina.net/flashsword/blog/145796"
),
OschinaBlog
.
class
)
.
run
();
}
}
webmagic-plugin/webmagic-misc/src/test/java/us/codecraft/webmagic/scheduler/RedisSchedulerTest.java
View file @
f4134504
package
us
.
codecraft
.
webmagic
.
scheduler
;
import
org.junit.Before
;
import
org.junit.Ignore
;
import
org.junit.Test
;
import
us.codecraft.webmagic.Request
;
import
us.codecraft.webmagic.Site
;
...
...
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