unaisaralegui/opencitingpy

citations/refererences can be mis-parsed

Opened this issue · 0 comments

This looks like a useful API, but I think I've found a bug. With this code:

import opencitingpy
c = opencitingpy.client.Client()
x = c.get_metadata('10.1007/s10593-014-1432-4')
x[0].reference

Prints

['10.1007/s11172-011-0150-7', '10.1002/(sici)1521-4184(199802)331:2<54::aid-ardp54>3.0.co', '2-6', '10.1016/s0040-4020(96)00911-8', '10.1021/ja963275g', '10.1021/jo00233a031', '10.1002/ejoc.200900935', '10.1246/bcsj.26.53', '10.1002/ejoc.201101489', '10.1039/b604632k', '10.1039/c0ob00515k', '10.1016/s0957-4166(03)00321-5', '10.1016/j.tet.2005.05.037', '10.1016/j.tetasy.2012.11.001', '10.1007/s10593-012-1053-8', '10.1021/ja108238a', '10.1002/cber.188902201232', '10.1002/cber.18930260225', '10.1248/cpb.35.1896', '10.1021/jo01273a060', '10.1271/bbb1961.51.1265', '10.1021/ja209472h', '10.1007/s10593-012-1051-x', '10.1021/ja01267a013', '10.1016/j.tetlet.2009.05.104', '10.1080/00397919408010615', '10.1021/ja01569a071', '10.1021/ja306766n', '10.1002/anie.201006128', '10.1002/jhet.5570400611', '10.1016/j.tetasy.2009.08.008', '10.1016/j.tetasy.2010.05.013', '10.1016/j.tet.2010.04.091', '10.1021/cr100287w', '10.15227/orgsyn.083.0070', '10.1016/j.tetasy.2007.12.006', '10.1021/jo026485m', '10.1021/ja103490h', '10.1039/j39710003088', '10.1055/s-2007-1000879', '10.1021/ja9079435', '10.1016/s0957-4166(99)00276-1', '10.1039/j39710002079', '10.1021/ol702884u', '10.1002/1521-3773(20010105)40:1<234::aid-anie234>3.0.co', '2-k', '10.1021/ol0712475', '10.1016/j.tetasy.2013.07.024']

Note that some DOIs have been split incorrectly: e.g.

'10.1002/1521-3773(20010105)40:1<234::aid-anie234>3.0.co', '2-k'

I think this is because the Metadata class uses ';' as its separator to split the json returned. I think the separator should be '; ' looking at the raw outputs.