1rr = r.execute_script(""" 2 var xhr = new XMLHttpRequest(); 3 xhr.open('GET', window.location.href, false); 4 xhr.send(null); 5 return xhr.status; 6""") # 利用JavaScript 脚本获取状态码
JavaScript 脚本获取网页响应状态码方法

风花雪月
2023-07-14
853 0 0
点赞
收藏
评论区
加载中...

风花雪月
2023-07-14
1rr = r.execute_script(""" 2 var xhr = new XMLHttpRequest(); 3 xhr.open('GET', window.location.href, false); 4 xhr.send(null); 5 return xhr.status; 6""") # 利用JavaScript 脚本获取状态码