获取实时更新的反诈骗动态案例
获取实时更新的反诈骗动态案例
生活大爆炸

获取实时更新的反诈骗动态案例

hualala
2022-11-10 / 0 评论 / 0 阅读 / 正在检测是否收录...
温馨提示:
本文最后更新于2022年11月11日,已超过532天没有更新,若内容或图片失效,请留言反馈。
转载请注明出处:小锋学长生活大爆炸[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 = 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()
```

0

评论 (0)

取消