【教程】获取实时反诈最新动态/案例

转载请注明出处:小锋学长生活大爆炸[xfxuezhang.blog.csdn.net]

请勿用于非法用途!

目录

宣传页链接

第一页帖子链接

其他页面链接

示例使用代码


        想搜集会动态更新的诈骗案例,用于做反诈宣传脚本,但网上都是诈骗静态帖子,没有会更新的。所以,瞄准了“国家反诈APP”,哈哈。做得挺好的!

宣传页链接

https://fzapph5.gjfzpt.cn/#/spread/spreadList

第一页帖子链接

https://oss.gjfzpt.cn/preventfraud-static/h5/list/1-1/1-1-1.json

其他页面链接

        请自行抓包获取。 

示例使用代码

import pyshorteners
import requests
import time# 存储上一次查询的结果
antispoofing_store = []  
def antiSpoofing():url = 'https://oss.gjfzpt.cn/preventfraud-static/h5/list/1-1/1-1-1.json'res = requests.get(url).json()lists = res['list']content = ''max_item = 3for item in lists[:max_item]:id = item['id']title = item['title']localFilePath = item['localFilePath']releaseTime = item['releaseTime']if id in antispoofing_store:continueelse:if len(antispoofing_store) >= max_item: antispoofing_store.pop(0)antispoofing_store.append(id)# 生成短链localFilePath = pyshorteners.Shortener().clckru.short(localFilePath)content += f'☠【{title}】——[{releaseTime}]\n☛{localFilePath}☚\n\n'if content:print('>> 无更新')return content.strip()# --------------------------------- #
antiSpoofing()
time.sleep(2)
antiSpoofing()


本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!

相关文章

立即
投稿

微信公众账号

微信扫一扫加关注

返回
顶部