Permalink
Browse files

Remove duplicate meta tags from document before passing it to EM

  • Loading branch information...
1 parent 5b2a8fb commit 50d7ffd2f10ff3bac00cfd209a581fecc1ef399c @aurimasv aurimasv committed Apr 19, 2012
Showing with 46 additions and 56 deletions.
  1. +46 −56 Wiley Online Library.js
@@ -9,7 +9,7 @@
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsv",
- "lastUpdated": "2012-03-22 22:30:17"
+ "lastUpdated": "2012-04-19 06:09:44"
}
/*
@@ -117,6 +117,11 @@ function scrape(doc, url, pdfUrl) {
newItem.complete();
} else {
+ //remove duplicate meta tags
+ var metas = ZU.xpath(doc, '//head/meta[not(following::link)]');
+ for(var i=0, n=metas.length; i<n; i++) {
+ metas[i].parentNode.removeChild(metas[i]);
+ }
var translator = Zotero.loadTranslator('web');
//use Embedded Metadata
translator.setTranslator("951c027d-74ac-47d4-a107-9c3069ab7b48");
@@ -281,7 +286,8 @@ var testCases = [
}
],
"title": "Endnotes",
- "bookTitle": "The World is Open",
+ "date": "2012/01/11",
+ "bookTitle": "The World is Open: How Web Technology is Revolutionizing Education",
"publisher": "Jossey‐Bass",
"ISBN": "9781118269381",
"DOI": "10.1002/9781118269381.notes",
@@ -358,7 +364,7 @@ var testCases = [
},
{
"firstName": "Rosana",
- "lastName": "Blanco-Cano",
+ "lastName": "BlancoCano",
"creatorType": "author"
},
{
@@ -379,40 +385,39 @@ var testCases = [
],
"notes": [],
"tags": [
- "1897",
+ "silent cinema and its pioneers (1906–1930)",
+ "Ángel García Cardona's El ciego de aldea (1906)",
+ "Ángel García Cardona and Antonio Cuesta",
+ "Ricardo Baños and Albert Marro's Don Pedro el Cruel (1911)",
+ "Fructuós Gelabert's Amor que mata (1909)",
+ "three films ‐ part of “the preliminary industrial and expressive framework for Spain's budding cinema”",
"Directors (Life and Works) ‐ Ángel García Cardona and Antonio Cuesta13",
- "Florián Rey (Antonio Martínez de Castillo)",
+ "Ricardo Baños",
"Florián Rey's La aldea maldita (1930)",
+ "Florián Rey (Antonio Martínez de Castillo)",
"Fructuós Gelabert ‐ made the first Spanish fiction film",
- "Fructuós Gelabert's Amor que mata (1909)",
- "Ricardo Baños",
- "Ricardo Baños and Albert Marro's Don Pedro el Cruel (1911)",
"Riña en un café",
- "silent cinema and its pioneers (1906–1930)",
- "three films ‐ part of “the preliminary industrial and expressive framework for Spain's budding cinema”",
- "Ángel García Cardona and Antonio Cuesta",
- "Ángel García Cardona's El ciego de aldea (1906)"
+ "1897"
],
"seeAlso": [],
"attachments": [
{
"title": "Snapshot"
- },
- {
- "title": "Full Text PDF",
- "mimeType": "application/pdf"
}
],
+ "title": "Silent Cinema and its Pioneers (1906–1930)",
+ "date": "2009/03/09",
"bookTitle": "100 Years of Spanish Cinema",
+ "publisher": "Wiley‐Blackwell",
"ISBN": "9781444304794",
+ "DOI": "10.1002/9781444304794.ch1",
"language": "en",
+ "pages": "1-20",
"url": "http://onlinelibrary.wiley.com/doi/10.1002/9781444304794.ch1/summary",
+ "accessDate": "CURRENT_TIMESTAMP",
"libraryCatalog": "onlinelibrary.wiley.com",
"rights": "Copyright © 2009 Tatjana Pavlović, Inmaculada Alvarez, Rosana Blanco-Cano, Anitra Grisales, Alejandra Osorio, and Alejandra Sánchez",
- "abstractNote": "This chapter contains sections titled: \nHistorical and Political Overview of the Period\nContext11\nFilm Scenes: Close Readings\nDirectors (Life and Works)\nCritical Commentary",
- "title": "Silent Cinema and its Pioneers (1906–1930)",
- "publisher": "Wiley‐Blackwell",
- "pages": "1-20"
+ "abstractNote": "This chapter contains sections titled: \nHistorical and Political Overview of the Period\nContext11\nFilm Scenes: Close Readings\nDirectors (Life and Works)\nCritical Commentary"
}
]
},
@@ -535,14 +540,10 @@ var testCases = [
"attachments": [
{
"title": "Snapshot"
- },
- {
- "title": "Full Text PDF",
- "mimeType": "application/pdf"
}
],
"title": "A mass spectrometry‐based method to screen for α‐amidated peptides",
- "date": "2012/01/01",
+ "date": "2011/12/14",
"publicationTitle": "PROTEOMICS",
"volume": "12",
"issue": "2",
@@ -598,14 +599,10 @@ var testCases = [
"attachments": [
{
"title": "Snapshot"
- },
- {
- "title": "Full Text PDF",
- "mimeType": "application/pdf"
}
],
"title": "A mass spectrometry‐based method to screen for α‐amidated peptides",
- "date": "2012/01/01",
+ "date": "2011/12/14",
"publicationTitle": "PROTEOMICS",
"volume": "12",
"issue": "2",
@@ -614,7 +611,7 @@ var testCases = [
"language": "en",
"pages": "173-182",
"ISSN": "1615-9861",
- "url": "http://onlinelibrary.wiley.com/doi/10.1002/pmic.201100327/full",
+ "url": "http://onlinelibrary.wiley.com/doi/10.1002/pmic.201100327/abstract",
"accessDate": "CURRENT_TIMESTAMP",
"libraryCatalog": "onlinelibrary.wiley.com",
"rights": "Copyright © 2012 WILEY-VCH Verlag GmbH & Co. KGaA, Weinheim",
@@ -661,14 +658,10 @@ var testCases = [
"attachments": [
{
"title": "Snapshot"
- },
- {
- "title": "Full Text PDF",
- "mimeType": "application/pdf"
}
],
"title": "A mass spectrometry‐based method to screen for α‐amidated peptides",
- "date": "2012/01/01",
+ "date": "2011/12/14",
"publicationTitle": "PROTEOMICS",
"volume": "12",
"issue": "2",
@@ -724,14 +717,10 @@ var testCases = [
"attachments": [
{
"title": "Snapshot"
- },
- {
- "title": "Full Text PDF",
- "mimeType": "application/pdf"
}
],
"title": "A mass spectrometry‐based method to screen for α‐amidated peptides",
- "date": "2012/01/01",
+ "date": "2011/12/14",
"publicationTitle": "PROTEOMICS",
"volume": "12",
"issue": "2",
@@ -779,22 +768,21 @@ var testCases = [
"attachments": [
{
"title": "Snapshot"
- },
- {
- "title": "Full Text PDF",
- "mimeType": "application/pdf"
}
],
- "bookTitle": "Klinisch‐toxikologische Analytik",
+ "title": "β‐Rezeptorenblocker",
+ "date": "2005/01/28",
+ "bookTitle": "Klinisch-toxikologische Analytik: Verfahren, Befunde, Interpretation",
+ "publisher": "Wiley‐VCH Verlag GmbH & Co. KGaA",
"ISBN": "9783527603015",
+ "DOI": "10.1002/3527603018.ch17",
"language": "de",
+ "pages": "365-370",
"url": "http://onlinelibrary.wiley.com/doi/10.1002/3527603018.ch17/summary",
+ "accessDate": "CURRENT_TIMESTAMP",
"libraryCatalog": "onlinelibrary.wiley.com",
"rights": "Copyright © 2002 Wiley-VCH Verlag GmbH",
- "abstractNote": "Immunoassay\nHochleistungsflüssigkeitschromatographie (HPLC)\nGaschromatographie\nMedizinische Beurteilung und klinische Interpretation\nLiteratur",
- "title": "β‐Rezeptorenblocker",
- "publisher": "Wiley‐VCH Verlag GmbH & Co. KGaA",
- "pages": "365-370"
+ "abstractNote": "Immunoassay\nHochleistungsflüssigkeitschromatographie (HPLC)\nGaschromatographie\nMedizinische Beurteilung und klinische Interpretation\nLiteratur"
}
]
},
@@ -828,19 +816,21 @@ var testCases = [
"mimeType": "application/pdf"
}
],
+ "title": "The Principled Case for Employing Private Military and Security Companies in Interventions for Human Rights Purposes",
+ "date": "2011/12/16",
+ "publicationTitle": "Journal of Applied Philosophy",
+ "volume": "29",
"issue": "1",
+ "publisher": "Blackwell Publishing Ltd",
"DOI": "10.1111/j.1468-5930.2011.00548.x",
"language": "en",
+ "pages": "1-18",
"ISSN": "1468-5930",
"url": "http://onlinelibrary.wiley.com/doi/10.1111/j.1468-5930.2011.00548.x/abstract",
+ "accessDate": "CURRENT_TIMESTAMP",
"libraryCatalog": "onlinelibrary.wiley.com",
"rights": "Published 2011. This article is a U.S. Government work and is in the public domain in the USA.",
- "abstractNote": "The possibility of using private military and security companies to bolster the capacity to undertake intervention for human rights purposes (humanitarian intervention and peacekeeping) has been increasingly debated. The focus of such discussions has, however, largely been on practical issues and the contingent problems posed by private force. By contrast, this article considers the principled case for privatising humanitarian intervention. It focuses on two central issues. First, does outsourcing humanitarian intervention to private military and security companies pose some fundamental, deeper problems in this context, such as an abdication of a state's duties? Second, on the other hand, is there a case for preferring these firms to other, state-based agents of humanitarian intervention? For instance, given a state's duties to their own military personnel, should the use of private military and security contractors be preferred to regular soldiers for humanitarian intervention?",
- "title": "The Principled Case for Employing Private Military and Security Companies in Interventions for Human Rights Purposes",
- "date": "2012/02/01",
- "publicationTitle": "Journal of Applied Philosophy",
- "volume": "29",
- "pages": "1-18"
+ "abstractNote": "The possibility of using private military and security companies to bolster the capacity to undertake intervention for human rights purposes (humanitarian intervention and peacekeeping) has been increasingly debated. The focus of such discussions has, however, largely been on practical issues and the contingent problems posed by private force. By contrast, this article considers the principled case for privatising humanitarian intervention. It focuses on two central issues. First, does outsourcing humanitarian intervention to private military and security companies pose some fundamental, deeper problems in this context, such as an abdication of a state's duties? Second, on the other hand, is there a case for preferring these firms to other, state-based agents of humanitarian intervention? For instance, given a state's duties to their own military personnel, should the use of private military and security contractors be preferred to regular soldiers for humanitarian intervention?"
}
]
}

0 comments on commit 50d7ffd

Please sign in to comment.