Gentoo Archives: gentoo-user

From: Philip Webb <purslow@××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] [OT] Differences between wget and browser file retrieval?
Date: Fri, 15 Jan 2021 07:40:59
Message-Id: YAFHA4QmRSeeYWJi@ca.inter.net
In Reply to: Re: [gentoo-user] [OT] Differences between wget and browser file retrieval? by David Haller
1 210114 David Haller wrote:
2 > On Thu, 14 Jan 2021, Walter Dnes wrote:
3 >> I download daily a PDF. Today, the command ...
4 >> wget https://files.ontario.ca/moh-covid-19-report-en-2021-01-14.pdf
5 >> returns a zero-byte file. *BUT*, sticking the URL into the URL bar
6 > >of Pale Moon and Google Chrome brings up the PDF file just fine.
7 >> Is "wget" being blocked ?
8 > I could download that file just fine just now[1].
9 > Try running 'wget' with the '-S' option.
10 > Oh and :
11 >> WARNING: cannot verify files.ontario.ca's certificate, issued by
12 > So, try:
13 > wget -S --no-check-certificate -U 'Mozilla/5.0 ...' \
14 > https://files.ontario.ca/moh-covid-19-report-en-2021-01-14.pdf
15 > BTW: you know that you can let date format that URL? e.g.:
16 > wget -S --no-check-certificate -U 'Mozilla/5.0 ...' \
17 > "$(date '+https://files.ontario.ca/moh-covid-19-report-en-%Y-%m-%d.pdf')"
18
19 Here in Toronto, I get the same result as Walter via his URL
20 & similar results from the 2 longer versions above,
21 except that the escaped version give "ERROR 403: Forbidden".
22
23 When I drop Walter's URL into the address bar of Firefox, no problem :
24 a 1,75 MB PDF which appears to have all the info.
25
26 It looks as if the site is refusing 'wget' requests from Ontario,
27 but allowing them from eg Germany (!).
28
29 What Walter is doing is well worthwhile. Press reports are very shallow
30 & the Ontario government doesn't appear to have any clear idea
31 just where & how the virus is being spread between humans. HTH.
32
33 --
34 ========================,,============================================
35 SUPPORT ___________//___, Philip Webb
36 ELECTRIC /] [] [] [] [] []| Cities Centre, University of Toronto
37 TRANSIT `-O----------O---' purslowatcadotinterdotnet

Replies

Subject Author
Re: [gentoo-user] [OT] Differences between wget and browser file retrieval? Walter Dnes <waltdnes@××××××××.org>