re.findall 不会在 html 中找到字符串。这是我的代码:def get_id(html_source): the_button = re.findall("preview.aspx?id=1692003076", html_source) print(the_button)当我print(html_source)得到 html 时,可以看到它包含“preview.aspx?id=1692003076”。re.search 也未能找到该字符串。我的代码中有另一个 re.findall ,它工作正常:id_matches = re.findall('<input type="checkbox" id="\d+"', html_source)知道为什么它不起作用吗?
添加回答
举报
0/150
提交
取消