本帖最后由 ncluoyu 于 2025-8-4 11:01 编辑
本帖最后由 ncluoyu 于 2025-8-4 10:59 编辑
我有个内部网站需要不停的抓取页面数据,但是现在遇到问题90分钟后会自动锁定然后跳转到锁屏界面,通过脚本点击页面元素、
function simulateMouseMovement() { // 创建一个鼠标移动事件 const mouseMoveEvent = new MouseEvent("mousemove", { bubbles: true, cancelable: true, clientX: Math.random() * window.innerWidth, clientY: Math.random() * window.innerHeight, }) document.dispatchEvent(mouseMoveEvent) }
function simulateScroll() { // 随机滚动到页面的某个位置 const scrollY = Math.random() * (document.documentElement.scrollHeight - window.innerHeight) window.scrollTo({ top: scrollY, behavior: "smooth", }) }
模拟操作均无效,求大佬指点排查思路,最好能找到定时脚本给他重写