Sanchit R Sanchit R - 1 year ago 111
Bash Question

Script to Mobile-Friendly test

I wanted to write a shell/python script which will check if a website is mobile friendly or not. Using browser this can be easily done by visiting-<website_addr>

For eg.-

I tried fetching the content through
commands but it did not worked.

How can I do so?

Answer Source

Solved it myself, with help of @TimberlakeCoding & @MartijnPieters. Here it is-

$ wget -q -O -‌​ | grep "\"pass\": true" 

If the exit status code is 0, that means website is mobile friendly else not.

Hope it helps someone! Thanks

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download