[英]Scrape information from meta data with Javascript
I wonder how I can scrape how I can scrape of author affiliation from a page like this: 我想知道如何从这样的页面抓取作者隶属关系:
http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=1701938 http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=1701938
The information that I want is stored in a meta-tag that looks like this: 我想要的信息存储在如下所示的元标记中:
<meta name="citation_author_institution" content="Department of Computing Science, University of Alberta">
I tried something like this: 我尝试过这样的事情:
var affiliation = doc.getElementsByTagName('meta').item(property='citation_author_institution');
But this didn't seem to work for me. 但这似乎不适用于我。 Can someone enlighten please
有人可以指教吗
Thx to the user Reeno, I finally got the content of this meta tag that I needed. 向用户Reeno致谢,我终于得到了所需的该meta标签的内容。 Here is the final code:
这是最终代码:
var affiliation = doc.getElementsByTagName('meta')[property='citation_author_institution'].content;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.