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
提交
取消