Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
weibohotcrawler
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
chenweiyang
weibohotcrawler
Commits
092f98d7
Commit
092f98d7
authored
Aug 22, 2019
by
zhiwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改为新版去重
parent
f67a184e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
12 deletions
+10
-12
pom.xml
+4
-4
src/main/java/com/zhiwei/weibocrawler/config/Config.java
+4
-6
src/main/java/com/zhiwei/weibocrawler/crawler/getdata/WeiboCrawlerAnalysis.java
+2
-2
No files found.
pom.xml
View file @
092f98d7
...
...
@@ -3,7 +3,7 @@
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.zhiwei
</groupId>
<artifactId>
weibohotcrawler
</artifactId>
<version>
0.0.
7
-SNAPSHOT
</version>
<version>
0.0.
8
-SNAPSHOT
</version>
<name>
weibohotcrawler
</name>
<description>
微博热搜1小时榜单,社会、热点采集程序
</description>
...
...
@@ -36,10 +36,10 @@
</dependency>
<dependency>
<groupId>
com.zhiwei.middleware
</groupId>
<artifactId>
cleaner-unified-urlfilterNew
</artifactId>
<version>
0.0.6-SNAPSHOT
</version>
<scope>
provided
</scope>
<artifactId>
cleaner-unified-filter
</artifactId>
<version>
1.0.1.RELEASE
</version>
</dependency>
</dependencies>
<!-- 打包管理 -->
<build>
...
...
src/main/java/com/zhiwei/weibocrawler/config/Config.java
View file @
092f98d7
...
...
@@ -12,18 +12,16 @@ public class Config {
conf
=
new
Properties
();
conf
.
load
(
is
);
is
.
close
();
rsidUrl
=
conf
.
getProperty
(
"zookeeper"
);
rsidGroup
=
conf
.
getProperty
(
"group"
);
redisWeiboKey
=
conf
.
getProperty
(
"rsidType"
);
zookeeper
=
conf
.
getProperty
(
"zookeeper"
);
group
=
conf
.
getProperty
(
"group"
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
public
static
String
rsidUrl
;
public
static
String
rsidGroup
;
public
static
String
redisWeiboKey
;
public
static
String
zookeeper
;
public
static
String
group
;
...
...
src/main/java/com/zhiwei/weibocrawler/crawler/getdata/WeiboCrawlerAnalysis.java
View file @
092f98d7
...
...
@@ -18,7 +18,7 @@ import com.zhiwei.weibobusiness.weibo4j.model.StatusWapper;
import
com.zhiwei.weibobusiness.weibo4j.model.WeiboException
;
import
com.zhiwei.weibocrawler.httpclient.HttpClientDemo
;
import
com.zhiwei.weibocrawler.rsidClient.DataQueue
;
import
com.zhiwei.weibocrawler.rsidClient.Rsid
ClientDAO
;
import
com.zhiwei.weibocrawler.rsidClient.Rsid
RedisClient
;
/**
*
...
...
@@ -117,7 +117,7 @@ public class WeiboCrawlerAnalysis {
if
(!
midsList
.
isEmpty
()){
for
(
String
mid
:
midsList
){
boolean
f
=
Rsid
ClientDAO
.
isWeiboExit
(
mid
);
boolean
f
=
Rsid
RedisClient
.
isNotDuplicated
(
mid
);
if
(!
f
)
{
DataQueue
.
offer
(
mid
);
}
...
...
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