gpt4 book ai didi

python - lxml 找到 ID 为 ='post-[0-9]*' 的

转载 作者:行者123 更新时间:2023-11-28 17:46:50 27 4
gpt4 key购买 nike

<分区>

我试图找到所有 id 以“post-{here a lot of digits}”开头的 div 标签我试过这样的事情:

tree.xpath("//div[starts-with(@id,'post-[0-9]')]")

但实际上并没有用。有没有办法在不在 python 中导入正则表达式的情况下执行此操作?

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com