CLI tool and Python library to download PDF issues of ilfattoquotidiano.it
Install this tool using pip
:
pip install ifq
Download the IFQ issue for Jan, 2nd 2025:
# Requires a valid subscription to the newspaper
export IFQ_USERNAME="[your username]"
export IFQ_PASSWORD="[your password]"
$ ifq issues download 2025-01-02
Downloading issue for 2025-01-02 00:00:00 to /Users/zmoog/code/projects/zmoog/ifq
Downloaded issue to /Users/zmoog/code/projects/zmoog/ifq/2025-01-02.pdf
$ file 2025-01-02.pdf
2025-01-02.pdf: PDF document, version 1.7
For help, run:
ifq --help
You can also use:
python -m ifq --help
To contribute to this tool, first checkout the code. Then create a new virtual environment:
cd ifq
python -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
python -m pytest