Commit 343edc2d3c193c49f3f99f3abb1e351162da00ae
1 parent
a989441e
2022年6月30日20:22:48 防止快手账号登录失效, 无限循环获取sig3信息
Showing
1 changed file
with
4 additions
and
0 deletions
src/main/java/cn/fw/freya/service/crawl/impl/KuaiShouCrawl.java
... | ... | @@ -15,6 +15,7 @@ import cn.fw.freya.model.data.pool.VideoPool; |
15 | 15 | import cn.fw.freya.model.dto.rpc.ReportAccountDto; |
16 | 16 | import cn.fw.freya.service.crawl.CrawlStrategy; |
17 | 17 | import cn.fw.freya.service.data.AccountService; |
18 | +import cn.fw.freya.service.rpc.AccountRpcService; | |
18 | 19 | import cn.fw.freya.utils.DateUtil; |
19 | 20 | import cn.fw.freya.utils.JsonUtils; |
20 | 21 | import cn.fw.freya.utils.PublicUtil; |
... | ... | @@ -83,6 +84,7 @@ public class KuaiShouCrawl implements CrawlStrategy, SmartLifecycle { |
83 | 84 | private final AccountService accountService; |
84 | 85 | private final String playbackBaseUrl = "https://live.kuaishou.com/playback/"; |
85 | 86 | private final ConcurrentHashMap<String, String> sig3Map = new ConcurrentHashMap<>(); |
87 | + private final AccountRpcService accountRpcService; | |
86 | 88 | |
87 | 89 | @Resource(name = "wmyThreadPool") |
88 | 90 | private ThreadPoolExecutor threadPoolExecutor; |
... | ... | @@ -117,6 +119,8 @@ public class KuaiShouCrawl implements CrawlStrategy, SmartLifecycle { |
117 | 119 | final String ns_sig3 = this.getNS_sig3(accountNo, dataType, true); |
118 | 120 | if (Objects.nonNull(ns_sig3)) |
119 | 121 | sig3Map.put(key, ns_sig3); |
122 | + else | |
123 | + accountRpcService.pushExpireAccount(accountNo, this.getType().getValue()); | |
120 | 124 | } |
121 | 125 | |
122 | 126 | /** | ... | ... |