More Generally: How can I run a process that runs from the terminal with required keyword arguments using python?
It seems subprocess.Popen is what I want to use.
Here is what I try to run from inside a script:
from subprocess import Popen
Popen(['goodreads-user-scraper', '--user_id 149832357'])
“goodreads-user-scraper” is recognized, but I don’t understand how to pass a keyword argument. I know how to pass an argument, but if I remove “—user_id” I still get same problem.
I have installed goodreads-user-scraper. It works well from the terminal. It is a python package that you can run from the terminal. Repository found here.
Below is how I would ideally like to run the process but from inside python:
pip install goodreads-user-scraper
goodreads-user-scraper --user_id <your id> --output_dir goodreads-data
Result of running from terminal: