On Thu, Jan 14, 2021 at 11:00:38PM +0100, David Haller wrote > So, try: > > wget -S --no-check-certificate -U 'Mozilla/5.0 ...' \ > https://files.ontario.ca/moh-covid-19-report-en-2021-01-14.pdf
No luck. For DNS, I use my ISP's servers (Teksavvy) with fallback to Google 8.8.8.8. ######################################################################## [i3][waltdnes][/dev/shm] wget -S --no-check-certificate -U 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:83.0) Gecko/20100101 Firefox/83.0' https://files.ontario.ca/moh-covid-19-report-en-2021-01-14.pdf --2021-01-15 02:15:30-- https://files.ontario.ca/moh-covid-19-report-en-2021-01-14.pdf Resolving files.ontario.ca... 13.33.160.117, 13.33.160.123, 13.33.160.45, ... Connecting to files.ontario.ca|13.33.160.117|:443... connected. HTTP request sent, awaiting response... HTTP/1.1 200 OK Content-Type: application/pdf Content-Length: 0 Connection: keep-alive Date: Thu, 14 Jan 2021 15:15:50 GMT Last-Modified: Thu, 14 Jan 2021 15:15:50 GMT ETag: "d41d8cd98f00b204e9800998ecf8427e" x-amz-meta-ctime: 1610637349 x-amz-meta-mode: 33188 x-amz-meta-gid: 500 x-amz-meta-uid: 500 x-amz-meta-mtime: 1610637349 Accept-Ranges: bytes Server: AmazonS3 X-Cache: Hit from cloudfront Via: 1.1 47dbad48e25df8c5ccf2822e46c2aaa6.cloudfront.net (CloudFront) X-Amz-Cf-Pop: YTO50-C3 X-Amz-Cf-Id: ARgHfF6QMVfUtkxqkr0AL5ljxIfE7Yd5xPmA4eDMx46NdPXOwIftnQ== Age: 57573 Length: 0 [application/pdf] Saving to: 'moh-covid-19-report-en-2021-01-14.pdf' moh-covid-19-report [ <=> ] 0 --.-KB/s in 0s 2021-01-15 02:15:30 (0.00 B/s) - 'moh-covid-19-report-en-2021-01-14.pdf' saved [0/0] ######################################################################## > BTW: you know that you can let date format that URL? e.g.: > > wget -S --no-check-certificate -U 'Mozilla/5.0 ...' \ > "$(date > '+https://files.ontario.ca/moh-covid-19-report-en-%Y-%m-%d.pdf')" Nice, but civil servants get stat holidays off. I downloaded Dec 25th and 26th PDFs on the 26th. Monday Dec 28th was a lieu day for Boxing day, so I downloaded the 28th and 29th PDFs on the 29th. And of course Jan 1st and 2nd PDFs on Jan 2nd. That's why I can't automate the date. I have a script "getone"... [i3][waltdnes][~/covid] cat getone #!/bin/bash wget https://files.ontario.ca/moh-covid-19-report-en-2021-01-${1}.pdf On the 14th it was invoked as "../getone 14" (called from the working directory, one level below the main "covid" directory). I tweak the script once a month to match year+month. In a worst-case scenario. I can go to https://covid-19.ontario.ca/covid-19-epidemiologic-summaries-public-health-ontario#daily to manually retrieve a daily PDF. Note that on this page, they list the date that the report is up to. The report issued 10:15 AM on the 14th shows up in the listing as "COVID-19 in Ontario: January 13, 2021". That's because it contains data up to the 13th. -- Walter Dnes <waltd...@waltdnes.org> I don't run "desktop environments"; I run useful applications