Created
June 21, 2012 05:01
-
-
Save mdengler/2963925 to your computer and use it in GitHub Desktop.
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 | |
""" | |
Proof of concept scraper for pinnacle sports | |
""" | |
FEED = "http://xml.pinnaclesports.com/pinnacleFeed.aspx" | |
import lxml.etree | |
import time | |
import urllib2 | |
#tree = lxml.etree.parse(urllib.urlopen(FEED)) | |
request = urllib2.Request(FEED) | |
t0 = time.time() | |
response = urllib2.urlopen(request).read() | |
t1 = time.time() | |
print "Read feed in %s seconds" % (t1 - t0) | |
tree = lxml.etree.fromstring(response) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment