简体   繁体   中英

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

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. Here is the final code:

var affiliation = doc.getElementsByTagName('meta')[property='citation_author_institution'].content;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM