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
8c8442e6
Commit
8c8442e6
authored
Aug 03, 2020
by
chenweiyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
冲突处理
parent
bb108a86
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
src/main/java/com/zhiwei/source_forward/util/MatchSource.java
+14
-0
No files found.
src/main/java/com/zhiwei/source_forward/util/MatchSource.java
View file @
8c8442e6
...
@@ -428,6 +428,20 @@ public class MatchSource {
...
@@ -428,6 +428,20 @@ public class MatchSource {
}
}
}
}
}
}
if
(
source
.
length
()
<
1
&&
html
.
contains
(
"window.__INITIAL_DATA__ ="
))
{
Matcher
ma
=
Pattern
.
compile
(
"window.__INITIAL_DATA__ =[\\s\\S]+?}}"
).
matcher
(
html
);
if
(
ma
.
find
())
{
String
result
=
ma
.
group
().
replaceAll
(
"window.__INITIAL_DATA__ =|\\</script\\>|"
,
""
).
trim
();
if
(
result
.
contains
(
"window.autohomePVDDWhiteList"
))
{
result
=
result
.
split
(
"window.autohomePVDDWhiteList"
)[
0
];
}
JSONObject
json
=
JSONObject
.
parseObject
(
result
.
trim
());
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
){
if
(
Objects
.
nonNull
(
source
)
&&
source
.
length
()>
1
){
source
=
"快资讯-"
+
source
;
source
=
"快资讯-"
+
source
;
}
}
...
...
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