import urllib2 as url
def getBetween(s, e, searched):
sInd = searched.find(s)
return searched[sInd + len(s):searched.find(e, sInd)]
def get(url):
isHards = []
isbns = []
done = False
for pg in xrange(1, 5000):
html = url.urlopen(url + '?PG=%d' % pg).read()
eInd = 0
while True:
sInd = html.find("(", eInd)
if sInd == -1:
if eInd == 0:
done = True
break
eInd = html.find("\n", sInd)
foo = html[sInd + len("("):eInd]
isHards.append('Hardback' in foo)
isbns.append(getBetween('ISBN10: ', ';', foo))
if done:
break
return results
print get('http://www.textbooks.com/Catalog/KMG/Geometry-for-K-12.php')
######
http://www.chartwellyorke.com/fathom/fathomdemos.html
http://isbndb.com/