The default bibtex exports from Semantic Scholar(S2) libraries do not include DOIs, which is problematic for some. This simple CLI app scratches that itch for you. It creates a new bibtex file with the missing DOIs. You may find it useful to ask Zotero SciHub plugin to fetch PDFs or find citation counts (with other plugins).
![image](https://private-user-images.githubusercontent.com/1910117/294233616-35a100ad-5307-4142-a6fb-e96cb2bd8049.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA4NDg3ODUsIm5iZiI6MTcyMDg0ODQ4NSwicGF0aCI6Ii8xOTEwMTE3LzI5NDIzMzYxNi0zNWExMDBhZC01MzA3LTQxNDItYTZmYi1lOTZjYjJiZDgwNDkucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcxMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MTNUMDUyODA1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ODY4OTEyMzQwNjQxMTRmOTBkOWNmOWFhM2IxZWNhZTM4YjM0YWMyMTY0ZWM3Yzk4MjMyNTcwNTdlYTlkYzJlYyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.Myq1rhqHVcbRrF7pxizv-Jqub9LfdhhAD_iiVRPp7p4)
- Install the deps
pip install -r requirements.txt
- Run in CLI
python doi_lookup.py my_semantic_scholar_exported.bib
- Check the results.
We basically use the official S2 API to fetch full information with the S2-assigned CorpusId
number. The basic lookup quota is pretty generous and should suffice most library sizes.