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
1ecccbba
Commit
1ecccbba
authored
Jan 11, 2019
by
yangchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
链接是否删除 初步完成 版本提升至0.0.9
parent
256d62f0
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
83 additions
and
49 deletions
+83
-49
pom.xml
+1
-1
src/main/java/com/zhiwei/source_forward/crawler/UrlLiveCrawler.java
+71
-32
src/main/java/com/zhiwei/source_forward/run/URLLive.java
+11
-16
No files found.
pom.xml
View file @
1ecccbba
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.zhiwei
</groupId>
<groupId>
com.zhiwei
</groupId>
<artifactId>
source-forward
</artifactId>
<artifactId>
source-forward
</artifactId>
<version>
0.0.
8
-SNAPSHOT
</version>
<version>
0.0.
9
-SNAPSHOT
</version>
<name>
source-forward
</name>
<name>
source-forward
</name>
<description>
验证网媒的转发关系及链接的有效性(转发验证微信及自媒体匹配率不高)
</description>
<description>
验证网媒的转发关系及链接的有效性(转发验证微信及自媒体匹配率不高)
</description>
...
...
src/main/java/com/zhiwei/source_forward/crawler/UrlLiveCrawler.java
View file @
1ecccbba
This diff is collapsed.
Click to expand it.
src/main/java/com/zhiwei/source_forward/run/URLLive.java
View file @
1ecccbba
package
com
.
zhiwei
.
source_forward
.
run
;
package
com
.
zhiwei
.
source_forward
.
run
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Map.Entry
;
import
java.util.Map.Entry
;
import
com.zhiwei.common.config.GroupType
;
import
com.zhiwei.crawler.core.HttpBoot
;
import
com.zhiwei.crawler.core.RequestUtils
;
import
com.zhiwei.crawler.proxy.ProxyFactory
;
import
com.zhiwei.source_forward.bean.UrlLiveBean
;
import
com.zhiwei.source_forward.bean.UrlLiveBean
;
import
com.zhiwei.source_forward.bean.UrlLiveBean.Attribution
;
import
com.zhiwei.source_forward.bean.UrlLiveBean.Attribution
;
import
com.zhiwei.source_forward.crawler.UrlLiveCrawler
;
import
com.zhiwei.source_forward.crawler.UrlLiveCrawler
;
...
@@ -69,17 +64,17 @@ public class URLLive {
...
@@ -69,17 +64,17 @@ public class URLLive {
return
UrlLiveCrawlerThread
.
getUrlLiveCrawle
(
urlList
);
return
UrlLiveCrawlerThread
.
getUrlLiveCrawle
(
urlList
);
}
}
public
static
void
main
(
String
[]
args
)
{
//
public static void main(String[] args) {
ProxyFactory
.
init
(
"zookeeper://192.168.0.36:2181"
,
"local"
,
GroupType
.
PROVIDER
);
//
ProxyFactory.init("zookeeper://192.168.0.36:2181","local",GroupType.PROVIDER);
List
<
String
>
urlList
=
new
ArrayList
<>();
//
List<String> urlList = new ArrayList<>();
urlList
.
add
(
"https://www.hao123.com/mid/16981890690654602094
"
);
// urlList.add("http://sh.qihoo.com/mob/transcoding?sign=360_e39369d1&n=10&pg=41&u=84c80ad777cd9a41152b4fd9c44f96e2&gzh=3093075895&news_sdk_version=&sqid=&_=1545026725607&callback=jsonp75&url=http%3A%2F%2Fzm.news.so.com%2F708e22872ce43ca08eec2a1fc57c6897&check=e0fae47326e7916f&ucheck=75e961d9583cfebe81a39e2dd972b0aa&uid=84c80ad777cd9a41152b4fd9c44f96e2&360newsdetail=1&c=detail&apiflag=detail&articlety=zmt
");
//
//
List
<
UrlLiveBean
>
u
=
URLLive
.
verificationURLLive
(
urlList
);
//
List<UrlLiveBean> u = URLLive.verificationURLLive(urlList);
for
(
UrlLiveBean
b
:
u
)
{
//
for(UrlLiveBean b : u) {
System
.
out
.
println
(
b
.
toString
());
//
System.out.println(b.toString());
}
//
}
}
//
}
static
class
UrlLiveCrawlerThread
extends
Thread
{
static
class
UrlLiveCrawlerThread
extends
Thread
{
...
...
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