Skip to content

Instantly share code, notes, and snippets.

@kontinuity
Created May 27, 2012 16:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kontinuity/2814909 to your computer and use it in GitHub Desktop.
Save kontinuity/2814909 to your computer and use it in GitHub Desktop.
* 0 * * * * python -c "import re, requests; from BeautifulSoup import BeautifulSoup; print re.findall(r'Dear Customer.*current Bill Cycle \d+', ' '.join(''.join(BeautifulSoup(requests.get('http://122.160.230.125:8080/gbod/gb_on_demand.do').content).findAll(text=True)).split()))[0]" | mailx -v -s "Airtel DSL usage status on `date`" you@yourdomain.com > /var/log/airtel.log 2>&1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment