使用google importxml xpath找到联系我们的页面 [英] find contact us pages using google importxml xpath
本文介绍了使用google importxml xpath找到联系我们的页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图从列B中的URL列表中将链接拉到联系页面。我尝试了以下方法,但出现错误:
I am trying to pull links to contact pages from a list of urls in column B. I have tried the following but I get an error:
=IMPORTXML(B10,"//a[contains('contact')]/@href")
我希望能够为每个含有包含单词contact的锚文本的元素获取href值。
I want to be able to get href value for every a element that has anchor text containing the word "contact".
任何帮助都可以感谢。
推荐答案
没有看到您导入的URL,我只能评论XPath表达式。你的表达无效, contains()
总是带两个参数。使用
Without seeing the URL you import, I can only comment on the XPath expression. Your expression is not valid, contains()
always takes two arguments. Use
=IMPORTXML(B10,"//a[contains(.,'contact')]/@href")
如果这样不能达到预期的结果,您必须告诉我们您正在导入的文档的URL 。
If that does not give the expected result, you have to tell us the URL of the document you are importing.
这篇关于使用google importxml xpath找到联系我们的页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文