- 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("<span class='regGray11px'>(", eInd)
- if sInd == -1:
- if eInd == 0:
- done = True
- break
- eInd = html.find("</span>\n", sInd)
- foo = html[sInd + len("<span class='regGray11px'>("):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/
wheeee
Posted by Anonymous on Thu 6th Jan 2011 16:46
raw | new post
view followups (newest first): wheeee by Anonymous
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.