Retrieval of page count fails
Closed this issue · 1 comments
erikhb commented
Hi,
thanks for the nice script. I ran into an error with the script, hathitrust seems to have changed the page layout. It dies when it tries to determine the page count.
I replaced
pages_book = int(soup.find("span", {"data-slot": "total-seq"}).text)
with
pages_book = int(soup.find("section", {'class': 'd--reader--viewer'})['data-total-seq'])
and it works for me.
Sorry for not sending a pull request but I am not at my laptop atm
Regards
luiseduardobr1 commented
Thanks, I updated the code and now is working.