diff --git a/IEEE Xplore.js b/IEEE Xplore.js index 4b5d601c80..ced45f68ed 100644 --- a/IEEE Xplore.js +++ b/IEEE Xplore.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2016-01-30 20:32:15" + "lastUpdated": "2016-02-16 03:42:26" } function detectWeb(doc, url) { @@ -105,13 +105,13 @@ function doWeb(doc, url) { } function scrape (doc, url) { - var arnumber = url.match(/arnumber=(\d+)/)[1]; - var pdf = ZU.xpathText(doc, '//span[contains(@class, "button")]/a[@class="pdf"]/@href') - Z.debug(pdf); - Z.debug("arNumber = " + arnumber); - var post = "recordIds=" + arnumber + "&fromPage=&citations-format=citation-abstract&download-format=download-bibtex"; - ZU.doPost('/xpl/downloadCitations', post, function(text) { - text = ZU.unescapeHTML(text.replace(/(&[^\s;]+) and/g, '$1;')); + var arnumber = url.match(/arnumber=(\d+)/)[1]; + var pdf = ZU.xpathText(doc, '//span[contains(@class, "button")]/a[@class="pdf"]/@href') + Z.debug(pdf); + Z.debug("arNumber = " + arnumber); + var post = "recordIds=" + arnumber + "&fromPage=&citations-format=citation-abstract&download-format=download-bibtex"; + ZU.doPost('/xpl/downloadCitations', post, function(text) { + text = ZU.unescapeHTML(text.replace(/(&[^\s;]+) and/g, '$1;')); //remove empty tag - we can take this out once empty tags are ignored text = text.replace(/(keywords=\{.+);\}/, "$1}"); var earlyaccess = false; @@ -139,19 +139,28 @@ function scrape (doc, url) { item.issue = ""; item.pages = ""; } + + item.attachments.push({ + document: doc, + title: "IEEE Xplore Abstract Record" + }); + if (pdf) { ZU.doGet(pdf, function (src) { - var m = /