Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
media_data_crawler
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
media_data_crawler
Commits
f0ddce27
Commit
f0ddce27
authored
Aug 11, 2018
by
zhiwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加翻页功能
parent
5f4ff8d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
src/main/java/com/zhiwei/media_data_crawler/crawler/BaiduTiebaCrawlerParse.java
+23
-0
No files found.
src/main/java/com/zhiwei/media_data_crawler/crawler/BaiduTiebaCrawlerParse.java
View file @
f0ddce27
...
...
@@ -64,6 +64,29 @@ public class BaiduTiebaCrawlerParse extends HttpClientTemplateOK {
return
list
;
}
/**
* 获取每页数据
* @Title: getBaiduTiebaData
* @author hero
* @param @param word
* @param @param proxy
* @param @param tiebaName
* @param @param page
* @param @return
* @param @throws Exception 设定文件
* @return Map<String,Object> 返回类型
*/
public
static
Map
<
String
,
Object
>
getBaiduTiebaData
(
String
word
,
Proxy
proxy
,
String
tiebaName
,
int
page
)
throws
Exception
{
String
htmlBody
=
downloadHtml
(
word
,
proxy
,
tiebaName
,
page
);
if
(
htmlBody
!=
null
)
{
return
analysisData
(
htmlBody
,
proxy
,
word
);
}
return
null
;
}
@SuppressWarnings
(
"unchecked"
)
public
static
List
<
TiebaData
>
getBaiduTiebaAnswerDataByUrl
(
String
url
,
Proxy
proxy
)
throws
Exception
{
List
<
TiebaData
>
list
=
new
ArrayList
<
TiebaData
>();
...
...
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