Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
source_forward
Overview
Overview
Details
Activity
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
zhiwei
source_forward
Commits
d6f4e440
Commit
d6f4e440
authored
Sep 03, 2019
by
zhiwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
验证是否删除添加知乎验证
parent
b7e91b0a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
6 deletions
+21
-6
pom.xml
+1
-2
src/main/java/com/zhiwei/source_forward/bean/UrlLiveBean.java
+18
-2
src/main/java/com/zhiwei/source_forward/crawler/UrlLiveCrawler.java
+0
-0
src/main/java/com/zhiwei/source_forward/run/URLLive.java
+2
-2
No files found.
pom.xml
View file @
d6f4e440
...
...
@@ -29,8 +29,7 @@
<dependency>
<groupId>
com.zhiwei.crawler
</groupId>
<artifactId>
crawler-core
</artifactId>
<version>
0.3.6-RELEASE
</version>
<scope>
provided
</scope>
<version>
0.5.2-RELEASE
</version>
</dependency>
</dependencies>
...
...
src/main/java/com/zhiwei/source_forward/bean/UrlLiveBean.java
View file @
d6f4e440
...
...
@@ -77,6 +77,8 @@ public class UrlLiveBean {
private
Integer
count
;
private
Integer
code
;
/**
* Constructor
*
...
...
@@ -92,6 +94,12 @@ public class UrlLiveBean {
* @param attr
* @param count
*/
private
Attribution
(
Object
attr
,
Integer
count
,
Integer
code
){
this
.
attr
=
attr
;
this
.
count
=
count
;
this
.
code
=
code
;
}
private
Attribution
(
Object
attr
,
Integer
count
){
this
.
attr
=
attr
;
this
.
count
=
count
;
...
...
@@ -114,7 +122,11 @@ public class UrlLiveBean {
* @return Attribution
*/
public
static
Attribution
of
(
Object
attr
,
Integer
count
)
{
return
new
Attribution
(
attr
,
count
);
return
new
Attribution
(
attr
,
count
);
}
public
static
Attribution
of
(
Object
attr
,
Integer
count
,
Integer
code
)
{
return
new
Attribution
(
attr
,
count
,
code
);
}
/**
...
...
@@ -135,7 +147,11 @@ public class UrlLiveBean {
return
count
;
}
public
void
AddCount
()
{
public
Integer
getCode
()
{
return
code
;
}
public
void
addCount
()
{
count
++;
}
}
...
...
src/main/java/com/zhiwei/source_forward/crawler/UrlLiveCrawler.java
View file @
d6f4e440
This diff is collapsed.
Click to expand it.
src/main/java/com/zhiwei/source_forward/run/URLLive.java
View file @
d6f4e440
...
...
@@ -11,6 +11,7 @@ import org.apache.logging.log4j.Logger;
import
com.zhiwei.common.config.GroupType
;
import
com.zhiwei.crawler.proxy.ProxyFactory
;
import
com.zhiwei.crawler.proxy.ProxyHolder
;
import
com.zhiwei.source_forward.bean.UrlLiveBean
;
import
com.zhiwei.source_forward.bean.UrlLiveBean.Attribution
;
import
com.zhiwei.source_forward.crawler.UrlLiveCrawler
;
...
...
@@ -74,8 +75,7 @@ public class URLLive {
public
static
void
main
(
String
[]
args
)
{
ProxyFactory
.
init
(
"zookeeper://192.168.0.36:2181"
,
"local"
,
GroupType
.
PROVIDER
);
List
<
String
>
urlList
=
new
ArrayList
<>();
urlList
.
add
(
"http://www.ebrun.com/ebrungo/zb/316384.shtml"
);
urlList
.
add
(
"https://www.zhihu.com/question/340524333"
);
List
<
UrlLiveBean
>
u
=
URLLive
.
verificationURLLive
(
urlList
);
for
(
UrlLiveBean
b
:
u
)
{
...
...
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