From The Compiler, 5 Years ago, written in Python.
Embed
  1. #!/usr/bin/python3
  2. # vim: set fileencoding=utf-8 ts=4 sts=4 sw=4 tw=80 expandtab :
  3.  
  4. import requests
  5. import lxml.html
  6. import subprocess
  7. import sys
  8.  
  9. if sys.argv[2] != up:
  10.     sys.exit(0)
  11.  
  12. essid = subprocess.check_output(["iwgetid", "--raw"]).decode('UTF-8').rstrip('\n')
  13.  
  14. if essid != 'Starbucks':
  15.     sys.exit(0)
  16.  
  17. url1 = "http://www.mpp.tpn.ch/starbucks.php?net=SBCH"
  18. doc = lxml.html.parse(url1).getroot()
  19. form = doc.get_element_by_id('frmConnect')
  20. newurl = form.action
  21. data = form.fields
  22. requests.post(newurl, data)

Replies to starbucks rss

Title Name Language When
Re: starbucks anonymous python 3 Years ago.