xpath& Google表格= importxml [英] xpath & Google Sheets =importxml
问题描述
我试图使用Xpath从网页中提取元描述,使用Google表格。
我有这个工作可以使用标题:< code $ = importXml(www.example.com;// title)
以下是我学习的两个来源:
http://seogadget.co.uk/playing-around-with-importxml-in-google-spreadsheets/
http://docs.google.com/support/bin/answer.py?hl=zh-TW&answer=75507 a>
我在这个网站上看过很多其他帖子,这似乎与我想要的类似:
/ html / head / meta [@ name ='description'] / @ content
/ * / head / meta [@ name ='description '] / @ content
// head / meta [@ name = \description \] / @ content
这些都不是在Google表格中工作,它指定将其写入Xpath。唯一的区别是,在Google表格中,您将使用代替(因此为什么要这样描述)。我诚实地尝试了219种不同的方式......没有运气。
任何想法?提前致谢!
// meta [@ name ='description'] / @ content
docs将是
= importxml(A1,// meta [@ name ='description'] / @ content)
我使用importXML构建了一些令人敬畏的SEO工具 - 这仅仅是它的开始!
I'm trying to use Xpath to pull in the meta descriptions from web pages, using Google Sheets.
I have this working to pull in the titles: =importXml(www.example.com; "//title")
Here are two sources of my learning:
http://seogadget.co.uk/playing-around-with-importxml-in-google-spreadsheets/
http://docs.google.com/support/bin/answer.py?hl=en&answer=75507
I have read many other posts on this site, and this seems to be the similar idea of what I want:
"/html/head/meta[@name='description']/@content"
"/*/head/meta[@name='description']/@content"
"//head/meta[@name=\"description\"]/@content"
None of these work in Google Sheets, which specifies to write it in Xpath. The only difference, is that in Google Sheets you are to use ' in place of " (hence why description is like that). I've honestly tried it about 219 different ways....no luck.
Any ideas? Thanks in advance!
//meta[@name='description']/@content
So your full URL call in google docs would be
=importxml(A1,"//meta[@name='description']/@content")
I've built some awesome SEO tools using importXML - this is just the start of it mate! :)
这篇关于xpath& Google表格= importxml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!