Output title of claimed book and newest owned book.
This commit is contained in:
parent
82cc803908
commit
aae36f970e
@ -31,9 +31,13 @@ g.doc.submit()
|
||||
g.doc.save('/tmp/free-learning-after-login.html')
|
||||
g.doc.text_assert('"sid":')
|
||||
g.doc.text_assert('Claim Your Free eBook')
|
||||
claim_book = g.doc.select('//div[@class="dotd-title"]/h2').text()
|
||||
print("Book: {}".format(claim_book))
|
||||
claim_url = g.doc.select('//a[@class="twelve-days-claim"]/@href').text()
|
||||
print("Claim URL: " + claim_url)
|
||||
print("Claim URL: {}".format(claim_url))
|
||||
g.go(claim_url)
|
||||
g.doc.save('/tmp/free-learning-after-claim.html')
|
||||
g.doc.text_assert('<h1>My eBooks </h1>')
|
||||
print("Claim successful.")
|
||||
last_claimed_title = g.doc.select('(//div[@id="product-account-list"]/div)[1]/@title').text()
|
||||
print("Last claimed book: {}".format(last_claimed_title))
|
||||
|
Loading…
x
Reference in New Issue
Block a user