How to click on all links in a page with "cURL" or "wget"?

Here you can discuss every aspect of Debian. Note: not for support requests!

How to click on all links in a page with "cURL" or "wget"?

Postby hack3rcon » 2021-02-07 08:33

Hello,
I want to click on all links in a page by "cURL" or "wget" tool. I found a curl command, but it show me below error:
Code: Select all
$ curl -r -l 2 https://www.TARGET.com/
Warning: Invalid character is found in given range. A specified range MUST
Warning: have only digits in 'start'-'stop'. The server's response to this
Warning: request is uncertain.
curl: (7) Couldn't connect to server
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Bad Request</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Bad Request - Invalid Header</h2>
<hr><p>HTTP Error 400. The request has an invalid header name.</p>
</BODY></HTML>

How can I fix it?

Thank you.
hack3rcon
 
Posts: 516
Joined: 2015-02-16 09:54

Re: How to click on all links in a page with "cURL" or "wget

Postby Head_on_a_Stick » 2021-02-07 09:38

Read the man page. And what does "click on all links" mean, exactly? That doesn't seem to make any sense at all in the context of curl or wget. What are you actually trying to do?
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 13262
Joined: 2014-06-01 17:46
Location: /dev/chair


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 9 guests

fashionable