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
30c78e18
Commit
30c78e18
authored
Aug 19, 2019
by
yangchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
快咨询 的 自媒体号获取处理完成
parent
27063da5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
src/main/java/com/zhiwei/source_forward/run/MediaSelfSource.java
+1
-1
src/main/java/com/zhiwei/source_forward/util/MatchSource.java
+4
-1
No files found.
src/main/java/com/zhiwei/source_forward/run/MediaSelfSource.java
View file @
30c78e18
...
...
@@ -25,7 +25,7 @@ public class MediaSelfSource {
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
s://tech.sina.cn/2019-07-30/detail-ihytcerm7194587.d.html
"
);
urlList
.
add
(
"http
://www.360kuai.com/pc/965e4d0b2814eb5bc?cota=3&kuai_so=1&sign=360_e39369d1&refer_scene=so_3
"
);
List
<
MediaSelfSourceBean
>
u
=
MediaSelfSource
.
getMediaSelfSource
(
urlList
);
for
(
MediaSelfSourceBean
b
:
u
)
{
System
.
out
.
println
(
b
.
toString
());
...
...
src/main/java/com/zhiwei/source_forward/util/MatchSource.java
View file @
30c78e18
...
...
@@ -399,7 +399,10 @@ public class MatchSource {
if
(
ma
.
find
())
{
String
result
=
ma
.
group
().
replaceAll
(
"window.__INITIAL_DATA__ =|\\</script\\>|"
,
""
).
trim
();
JSONObject
json
=
JSONObject
.
parseObject
(
result
.
substring
(
0
,
result
.
length
()-
1
));
source
=
json
.
getJSONObject
(
"detail"
).
getString
(
"src"
);
source
=
json
.
getJSONObject
(
"detail"
).
getString
(
"sec_src"
);
if
(
Objects
.
isNull
(
source
)
||
source
.
length
()
<
1
)
{
source
=
json
.
getJSONObject
(
"detail"
).
getString
(
"src"
);
}
}
}
if
(
Objects
.
nonNull
(
source
)
&&
source
.
length
()>
1
){
...
...
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