tags - 阻止 Comscore 机器人访问
问题描述
实际上,我在用户代理中为 Bot 设备获取了 Bot Fraud,这似乎是 comscore 爬虫。
Mozilla/5.0(兼容;近端;+https://www.comscore.com/Web-Crawler)
如何停止从代理 IP 进行机器人访问。
非常感谢
解决方案
如果你使用 cloudflare,你可以用它来删除它。
(http.user_agent contains "Yandex")
or (http.user_agent contains "muckrack")
or (http.user_agent contains "Qwantify")
or (http.user_agent contains "Sogou")
or (http.user_agent contains "BUbiNG")
or (http.user_agent contains "knowledge")
or (http.user_agent contains "CFNetwork")
or (http.user_agent contains "Scrapy")
or (http.user_agent contains "SemrushBot")
or (http.user_agent contains "AhrefsBot")
or (http.user_agent contains "Baiduspider")
or (http.user_agent contains "python-requests")
or ((http.user_agent contains "crawl")
or (http.user_agent contains "Crawl")
or (http.user_agent contains "bot" and not http.user_agent contains "bingbot" and not http.user_agent contains "Google" and not http.user_agent contains "Twitter")
or (http.user_agent contains "Bot" and not http.user_agent contains "Google")
or (http.user_agent contains "Spider")
or (http.user_agent contains "spider")
and not cf.client.bot)
在 cloudflare 上配置:
检查块:
推荐阅读
- python - 如何根据键值将键控 RDD 划分为 2 个分区
- python - discord python bot获取用户输入
- java - 弹簧数据 aerospike | 在整个事务回滚的情况下如何实现回滚
- wso2 - WSo2 API Manager In Sequence 使用 Call Mediator 调用一个返回空 JSON 有效负载响应但在响应标头中的值的 REST API
- c# - 此请求的身份验证已被拒绝
- python - 在 python 程序中使用交换空间是个好主意吗?
- pytorch - 为什么不使用 torch.cuda.empty_cache() 释放 CUDA 内存
- c - 处理字符时出现分段错误
- mysql - 计算行数使用类似mysql的条件
- unix - Shell 脚本 - 无法使用输出变量