A Python script to scrape comments from DMP Online (at Erasmus University Rotterdam)
To log in to DMP Online, we need cookies and headers.
- Create the
config.py
file. - You need to save cookies and headers to this file (see
config.example.py
). You can get the cURL, and convert it via curlconverter. To get the cURL, do the following:- Log in to DMP Online
- Go to https://dmponline.eur.nl/plans
- Open the DevTools. Go to the "Network" tab.
- Reload the page
- In the "Name" pane, look for the first request ("plans"). Right click the plan -> Copy -> Copy as cURL
- Copy and paste the Python script to the
config.py
file. You only needcookies
andheaders
dictionaries.
Run the scrape_comments.py
. It will create a pickle and JSON files that contains the results. Scraping may take around 5 minutes. Note that the script only gets comments from DMPs using EUR's v4.5 DMP Template only.