Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- username = SET_THIS
- password = SET_THIS
- import sys
- import fluidinfo
- notices = []
- isbn = ""
- page = ""
- paragraph = ""
- errata = ""
- headers = {}
- contents = {}
- cover_url = ""
- data = {}
- abouttag = ""
- title = ""
- isbn = 'asdfsdfdasfa'
- fluidinfo.login(username, password)
- print "Logged into %s as %s" % (fluidinfo.instance, username)
- query = 'oreilly.com/isbn = "%s"' % isbn
- print "Query: %s" % query
- headers, contents = fluidinfo.call('GET', '/values', tags=['fluiddb/about', 'oreilly.com/cover-medium', 'oreilly.com/title'], query=query)
- fluidinfo.logout()
- print "Status: %s" % headers['status']
- for r in contents['results']['id'].values():
- abouttag = r['fluiddb/about']['value']
- cover_url = r['oreilly.com/cover-medium']['value']
- title = r['oreilly.com/title']['value']
- print "About: %s" % abouttag
- print "URL: %s" % cover_url
- print "Title: %s" % title
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement