/scholar

JSON data of published papers with DOIs and Journal Impact Factors for professors

Primary LanguagePython

Scholar API

This project uses a home server cronjob to scrape Google Scholar data via the scholarly Python package and the wikipedia Python package to get the journal's impact factor (IF) and the publication's DOI.

The JSON can then be used, for example, by uploading the data to a publicly accessible server via Secure Copy (SCP) or rsync, which serves the JSON data via a Flask application.

Installation

Prerequisites

  • Python 3.6+
  • Flask
  • scholarly
  • Wikipedia

Setup

  1. Clone this repository to your local machine.
  2. Install the required packages.
  3. Setup.
git clone https://github.com/Luen/scholarly-api
python -m venv scholar
source scholar/bin/activate
pip install -r requirements.txt
playwright install
  1. Test run.
python main.py ynWS968AAAAJ
  1. Set up cronjob.
0 * * * * /path/to/your_bash_script.sh

Testing

Install pytest and run it using the command pytest.

Starting the flask app

Navigate to the project directory and run the Flask application: python ./serve.py

Index Welcome Message

URL: / Method: GET Description: Displays a welcome message in plain text. Example: /

Get Author Id

URL: /author_id Method: GET Description: Searches for authors by id. Parameter: id Example: /ynWS968AAAAJ

License

This open-sourced project is released under the Unlicense.

Notes

Alternative wikipedia packages: wikipedia-api and pymediawiki