我想从几个不同的网站提取电子邮件地址。如果它们是活动链接格式,我可以使用
//A[starts-with(@href, 'mailto:')]
但其中一些只是文本格式example@domain.com,而不是链接,所以我想选择包含@在其中的元素的路径
example@domain.com
@
ruby xpath nokogiri
nokogiri ×1
ruby ×1
xpath ×1