Skip to content

Instantly share code, notes, and snippets.

@markuskreitzer
Created March 7, 2014 16:13
Show Gist options
  • Save markuskreitzer/9414447 to your computer and use it in GitHub Desktop.
Save markuskreitzer/9414447 to your computer and use it in GitHub Desktop.
Get my order status from the pebble website
#!/usr/bin/env python
import urllib2
from BeautifulSoup import BeautifulSoup
order_key = 'xxxxxxxxxxxxxxxxxx'
url = 'https://getpebble.com/orders/' + order_key
request = urllib2.Request(url)
result = urllib2.urlopen(request)
t = result.read()
bs = BeautifulSoup(t)
print bs.find("span",{"class": "order-status"}).getText()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment