【发布时间】:2021-12-30 11:42:59
【问题描述】:
这个页面有一个网址https://www.example.com
<html>
<body>
<button id="button1" onclick=func1()>
<button id="button2" onclick=func2()>
</body>
<script>
function func1(){
open("/doubt?s=AAAB_BCCCDD");
}
function func2(){
open("/doubt?s=AABB_CCDDEE");
}
//something like that, it is working ....
</script>
</html>
AAAB_BCCCDD 和 AABB_CCDDEE - 都是令牌...
我想用 python 获取页面中的第一个令牌
我的python代码-
import requests
r = requests.get("https://www.example.com")
s = r.text
if "/doubt?s=" in s:
# After this i can' understand anything ...
# i want to get the first token here as a variable
请帮帮我....
【问题讨论】:
标签: javascript python html python-requests