Open brandonStell opened 5 years ago
by the way the code above was taken from here: http://zzz.rezo.net/HowTo-Expand-Short-URLs.html
We have this feature already. It's just not available from the API but could be very easily.
Le mar. 30 avr. 2019 à 18:54, Brandon Stell notifications@github.com a écrit :
by the way the code above was taken from here: http://zzz.rezo.net/HowTo-Expand-Short-URLs.html
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/PubPeerFoundation/PublicationDataExtractor/issues/16#issuecomment-488030069, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJBQMH4ZR4FNULMHXIQ6V3PTB2TFANCNFSM4HJOMB6Q .
That would be great. However, I think the problem is more complicated that I originally thought. For example this DOI: 10.1016/j.cell.2019.02.019 Should resolve to this URL: https://www.cell.com/cell/fulltext/S0092-8674(19)30168-0 Like it does here: https://doi.org/10.1016/j.cell.2019.02.019
cURL in my script above does not return the correct link...
I can get the correct link only when I use the selenium package in python (presumably because it emulates a real browser).
(also note that the URL returned by the crossref API is not correct)
I guess we'll probably need an array of links for each DOI since there seems to be several.
We could do it based on DOIs using something like this:
For things that don't have a DOI (only arXiv?) we can make the URL from the ID: