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
eba74706
Commit
eba74706
authored
May 15, 2019
by
yangchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加连线家 自媒体号查询
parent
196e523d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
4 deletions
+21
-4
src/main/java/com/zhiwei/source_forward/run/MediaSelfSource.java
+1
-1
src/main/java/com/zhiwei/source_forward/run/URLLive.java
+1
-1
src/main/java/com/zhiwei/source_forward/util/MatchSource.java
+19
-2
No files found.
src/main/java/com/zhiwei/source_forward/run/MediaSelfSource.java
View file @
eba74706
...
@@ -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
://dy.163.com/v2/article/detail/EANTKV6H0512ES8F
.html"
);
urlList
.
add
(
"http
s://36kr.com/coop/retail/post/5197093
.html"
);
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/URLLive.java
View file @
eba74706
...
@@ -72,7 +72,7 @@ public class URLLive {
...
@@ -72,7 +72,7 @@ public class URLLive {
// 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
://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
");
// urlList.add("http
s://www.toutiao.com/a6680674354260345355
");
//
//
//
//
// List<UrlLiveBean> u = URLLive.verificationURLLive(urlList);
// List<UrlLiveBean> u = URLLive.verificationURLLive(urlList);
...
...
src/main/java/com/zhiwei/source_forward/util/MatchSource.java
View file @
eba74706
...
@@ -159,7 +159,7 @@ public class MatchSource {
...
@@ -159,7 +159,7 @@ public class MatchSource {
source
=
"东方看点-"
+
source
;
source
=
"东方看点-"
+
source
;
}
}
}
else
if
(
url
.
contains
(
"sh.qihoo.com"
)){
}
else
if
(
url
.
contains
(
"sh.qihoo.com"
)
||
url
.
contains
(
"360kuai.com"
)
){
//今日报点解析
//今日报点解析
source
=
document
.
select
(
"span.source"
).
text
().
trim
();
source
=
document
.
select
(
"span.source"
).
text
().
trim
();
if
(
source
.
length
()
<
2
)
{
if
(
source
.
length
()
<
2
)
{
...
@@ -278,10 +278,27 @@ public class MatchSource {
...
@@ -278,10 +278,27 @@ public class MatchSource {
if
(
source
!=
null
&&
!
source
.
equals
(
""
)){
if
(
source
!=
null
&&
!
source
.
equals
(
""
)){
source
=
"科技讯-"
+
source
;
source
=
"科技讯-"
+
source
;
}
}
}
else
if
(
url
.
contains
(
"36kr.com"
)){
source
=
document
.
select
(
"div.info-header-text > a.author-name"
).
text
();
if
(
source
!=
null
&&
!
source
.
equals
(
""
)){
return
"36氪-"
+
source
;
}
source
=
document
.
select
(
"h4.author-name"
).
text
();
if
(
source
!=
null
&&
!
source
.
equals
(
""
)){
return
"36氪-"
+
source
;
}
source
=
document
.
select
(
"span.author-nickname"
).
text
();
if
(
source
!=
null
&&
!
source
.
equals
(
""
)){
return
"36氪-"
+
source
;
}
}
else
if
(
url
.
contains
(
"lianxianjia.com"
)){
source
=
document
.
select
(
"span.author-name"
).
text
();
if
(
source
!=
null
&&
!
source
.
equals
(
""
)){
source
=
"连线家-"
+
source
;
}
}
}
return
source
;
return
source
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
null
;
return
null
;
}
}
}
}
...
...
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