clarify caveats

This commit is contained in:
Sebastian Hugentobler 2024-07-02 08:38:16 +02:00
parent c61f7ac590
commit 3edb6a7671
Signed by: shu
GPG Key ID: BB32CF3CA052C2F0

View File

@ -1,18 +1,19 @@
# NZZ Downloader # NZZ Downloader
The [NZZ](https://en.wikipedia.org/wiki/Neue_Z%C3%BCrcher_Zeitung) is the Swiss The [NZZ](https://en.wikipedia.org/wiki/Neue_Z%C3%BCrcher_Zeitung) is the Swiss
Swiss newspaper of record. Its first issue was all the way back in 1780. It's Swiss newspaper of record. Its first issue was all the way back in 1780. It's
even better that you can download every single issue ever released (if even better that you can download every single issue ever released (if you have
you have a subscription of course). a subscription of course).
This little tool helps you with downloading all released issues in a specified This little tool helps you with downloading all released issues in a specified
time span. time span.
It was written because the archive website is not very friendly in the author's It was written because the archive website is not very friendly in the author's
opinion and of course because it is not possible to download everything in a time opinion and of course because it is not possible to download everything in a
span. time span.
Because the archive website makes heavy use of javascript this is done with Because the archive website makes heavy use of javascript this is done with
[selenium](https://www.selenium.dev/) to remote control a browser (firefox in [selenium](https://www.selenium.dev/) to remote control a browser (firefox in
this case). This is also why it is not all that fast but that is ok. this case). This is also why it is not all that fast but that is ok.
Please only use this with your own credentials, the journalists deserve to be Please only use this with your own credentials, the journalists deserve to be
@ -21,6 +22,7 @@ paid for their work.
![screenshot](screenshot.jpg) ![screenshot](screenshot.jpg)
## Installation ## Installation
You need to be comfortable with the command line to use the nzz downloader and You need to be comfortable with the command line to use the nzz downloader and
it has only been tested on linux systems though it should work fine on Windows it has only been tested on linux systems though it should work fine on Windows
or macOS. or macOS.
@ -31,6 +33,7 @@ or macOS.
- [nzz.js](https://code.vanwa.ch/sebastian/nzz-downloader/-/releases) - [nzz.js](https://code.vanwa.ch/sebastian/nzz-downloader/-/releases)
## Usage ## Usage
``` ```
Usage: nzz.js -f [date] -t [date] -o [path] -u [usernane] -p [password] Usage: nzz.js -f [date] -t [date] -o [path] -u [usernane] -p [password]
@ -44,19 +47,28 @@ Options:
-p, --password Password for the user. [required] -p, --password Password for the user. [required]
``` ```
### Examples ### Examples
Download all existing issues from 01-01-1780 until 30-02-1780 to the default
Download all existing issues from 1780-01-01 until 1780-02-30 to the default
directory "./nzz" directory "./nzz"
``` ```
./nzz.js -u 'myuser@example.com' -p 'mypassword' -f 1780-01-01 -t 1780-02-30 ./nzz.js -u 'myuser@example.com' -p 'mypassword' -f 1780-01-01 -t 1780-02-30
``` ```
## Caveats ## Caveats
You need a good internet connection, as the program only waits 5 seconds until a
download of an issue can start. This is something that is hard to solve unfortunately.
If you get strange errors about elements not being visible, wait a bit and try again, You need a good internet connection, as the program only waits a couple seconds
it's usually a network problem. until a download of an issue can start. This is something that is hard to solve
unfortunately.
If you get strange errors about elements not being visible, wait a bit and try
again, it's usually a network problem.
The proper way of doing this would be to figure out how the calls to the backend
work and do that instead of using the heavy handed approach of instrumenting a
browser.
## Licence ## Licence
Licensed as [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). Licensed as [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/).