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
9557316d
Commit
9557316d
authored
May 23, 2019
by
win 10
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增了txt文件的来源和大部分平台来源解析
parent
6e7f47cf
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
15 deletions
+42
-15
src/main/java/com/zhiwei/source_forward/run/MediaSelfSource.java
+1
-1
src/main/java/com/zhiwei/source_forward/run/SourceForward.java
+1
-1
src/main/java/com/zhiwei/source_forward/run/URLLive.java
+13
-11
src/main/java/com/zhiwei/source_forward/util/MatchSource.java
+0
-0
src/main/resources/sourceList.txt
+27
-2
No files found.
src/main/java/com/zhiwei/source_forward/run/MediaSelfSource.java
View file @
9557316d
...
@@ -25,7 +25,7 @@ public class MediaSelfSource {
...
@@ -25,7 +25,7 @@ public class MediaSelfSource {
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
(
"http
s://www.360kuai.com/pc/9277f65f68bba0265?cota=3&kuai_so
=1&sign=360_e39369d1&refer_scene=so_3"
);
urlList
.
add
(
"http
://sh.qihoo.com/pc/9dcfa48989d33df34?cota
=1&sign=360_e39369d1&refer_scene=so_3"
);
List
<
MediaSelfSourceBean
>
u
=
MediaSelfSource
.
getMediaSelfSource
(
urlList
);
List
<
MediaSelfSourceBean
>
u
=
MediaSelfSource
.
getMediaSelfSource
(
urlList
);
for
(
MediaSelfSourceBean
b
:
u
)
{
for
(
MediaSelfSourceBean
b
:
u
)
{
System
.
out
.
println
(
b
.
toString
());
System
.
out
.
println
(
b
.
toString
());
...
...
src/main/java/com/zhiwei/source_forward/run/SourceForward.java
View file @
9557316d
...
@@ -81,7 +81,7 @@ public class SourceForward {
...
@@ -81,7 +81,7 @@ public class SourceForward {
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
(
"http
://www.northnews.cn/2019/0419/3080909.s
html"
);
urlList
.
add
(
"http
s://www.jiemian.com/article/2782869.
html"
);
List
<
SourceForwardBean
>
da
=
SourceForward
.
getSourceForward
(
urlList
);
List
<
SourceForwardBean
>
da
=
SourceForward
.
getSourceForward
(
urlList
);
for
(
SourceForwardBean
sfb
:
da
)
{
for
(
SourceForwardBean
sfb
:
da
)
{
System
.
out
.
println
(
sfb
.
toString
());
System
.
out
.
println
(
sfb
.
toString
());
...
...
src/main/java/com/zhiwei/source_forward/run/URLLive.java
View file @
9557316d
...
@@ -9,6 +9,8 @@ import java.util.Map.Entry;
...
@@ -9,6 +9,8 @@ import java.util.Map.Entry;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.apache.logging.log4j.Logger
;
import
com.zhiwei.common.config.GroupType
;
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 +71,17 @@ public class URLLive {
...
@@ -69,17 +71,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.toutiao.com/a6680674354260345355
");
urlList
.
add
(
"http://www.ebrun.com/ebrungo/zb/316384.shtml
"
);
//
//
//
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
{
...
...
src/main/java/com/zhiwei/source_forward/util/MatchSource.java
View file @
9557316d
This diff is collapsed.
Click to expand it.
src/main/resources/sourceList.txt
View file @
9557316d
...
@@ -893,6 +893,7 @@ ZOL中关村在线
...
@@ -893,6 +893,7 @@ ZOL中关村在线
华东理工大学
华东理工大学
华东在线
华东在线
华尔街见闻
华尔街见闻
华尔街见闻网
华股财经
华股财经
华龙网
华龙网
华龙网法律频道
华龙网法律频道
...
@@ -2488,6 +2489,7 @@ ZOL中关村在线
...
@@ -2488,6 +2489,7 @@ ZOL中关村在线
智慧长沙
智慧长沙
智慧长沙资讯
智慧长沙资讯
智能派
智能派
智通财经
智通财经网
智通财经网
置家网
置家网
中安在线
中安在线
...
@@ -3052,4 +3054,27 @@ ZOL中关村在线
...
@@ -3052,4 +3054,27 @@ ZOL中关村在线
走进中关村
走进中关村
最高人民法院网
最高人民法院网
最高人民检察院
最高人民检察院
今日湖北
今日湖北
\ No newline at end of file
中国经营报
三言财经
TechWeb.com.cn
中企网
央视新闻移动网
新浪财经-自媒体综合
T媒体
《法人》
国是直通车
科技小肆
雷帝触网
铅笔道
三秦都市报
新浪财经综合
央视财经
第一财经
第一赢销网
国际金融报
A5创业网
运营商世界网讯
中外管理杂志
上游新闻综合
新蓝网·浙江网络广播电视台
\ No newline at end of file
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