davidagraf / doi2bib2

350 stars 24 forks source link

Unable to find doi from an incomplete URL #2

Closed sgrieve closed 6 years ago

sgrieve commented 6 years ago

I was using the tool today, and copied and pasted the following:

doi.org/10.1002/esp.3406

into the box on https://www.doi2bib.org and got the message invalid doi. I realise that this is technically an invalid doi, and by using either:

10.1002/esp.3406

or

https://doi.org/10.1002/esp.3406

a correct result would be obtained. But for users who are not as familiar with the doi specification, who are copying and pasting things from other sites this may lead to confusion. Would it be possible to add a further check to the input string to identify this case, strip doi.org/ and re-try to get a bibtex file with the corrected string?

Thanks!

davidagraf commented 6 years ago

fixed c594c9d22b580711c3f69aedba90b5b8ddf4a4e7