【发布时间】:2020-07-01 06:39:23
【问题描述】:
文本显示在 textarea 中,但未包含在元素中。 我可以在浏览器网络的 XHR 响应中找到它,如何从 XHR 响应中获取它?
这就是网站 HTML 调用我试图提取文本的区域的方式:
<textarea class="text sr "
wrap="off" id="arid_WIN_2_1000000161"
cols="20" maxlen="15"
style="top: 0px; left: 117px; width: 175px; height: 21px; background-color: rgb(204, 204, 204);"
arautocak="0" arautoctt="400"
arencryptdataatrest="0" rows="1" readonly="">
</textarea>
这是响应结果:
this.result = {
s: "null",
oa: "fq0_1.SV(1000000621, {t: 7, v:\"1593581897\"}); fq0_1.SV(1000000161, {t: 4, v: \"INC0000AAAAAAAA\"});"
};
this.cacheIDRefCount = {
"smt-backend": 1
};;
if (getCurWFC_NS(this.windowID) != null)
getCurWFC_NS(this.windowID).status([]);
'INC0000AAAAAAAA' 是我想要的文本。
【问题讨论】:
-
我只能在 XHR 请求的响应结果中找到文本。
标签: javascript html python-3.x selenium selenium-chromedriver