Neither wget nor curl downloads this wikipedia api request

0

I can perfectly download this link and save it as a text file in a web browser environment. But I can't download and save that wikipedia api request using neither wget nor curl. I use wget -O file.txt https://that-ugly-url, but it contains a different html content rather than the correct api reply which I'm able to download using a browser.

mrdolichenus

Posted 2016-03-20T13:24:54.670

Reputation: 1

Answers

1

Put the link between quotation marks like below. In most of the shells ?,& have special meanings.

wget -O file.txt "https://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvprop=content&rvsection=0&titles=wikipedia&format=php"

user1514631

Posted 2016-03-20T13:24:54.670

Reputation: 121