前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >获取实时反诈最新动态/案例

获取实时反诈最新动态/案例

作者头像
小锋学长生活大爆炸
发布2022-11-18 15:40:44
4480
发布2022-11-18 15:40:44
举报
文章被收录于专栏:小锋学长生活大爆炸

转载请注明出处:小锋学长生活大爆炸[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

其他页面链接

        请自行抓包获取。 

示例使用代码

代码语言:javascript
复制
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 = 3
    for item in lists[:max_item]:
        id = item['id']
        title = item['title']
        localFilePath = item['localFilePath']
        releaseTime = item['releaseTime']
        if id in antispoofing_store:
            continue
        else:
            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()
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2022-11-11,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 宣传页链接
  • 第一页帖子链接
  • 其他页面链接
  • 示例使用代码
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档