Created
March 7, 2014 16:13
-
-
Save markuskreitzer/9414447 to your computer and use it in GitHub Desktop.
Get my order status from the pebble website
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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