sub199 sub199 - 5 months ago 50
Linux Question

Click button using curl

I need to fetch contact number from an URL, may be using curl.

Sample link-

Contact number button in on right hand side & value is hidden. Once you click on it, value shows up. There is no onclick event on button. Please let me know.


You can do it with combination of curl, sed and grep command outputs.

Here is an example:

wget -q -O - $(echo$(curl -s | grep link-phone | egrep -oh \'id\'\:\'\\S+\' | tail -n 1 | sed -e s/\'id\'\://g | sed -e s/\'//g))