mardi 31 janvier 2017

How to count how many pages on a web page using python

I am trying to make a program (for practice) that count how many chapters and verses in each book of bible.... So let say if I want to know total chapters or verses in book 1 then it will give me the total number. If I only want to know the number of verse in chapter 4 in book 2 then it only gives me the number of verses in that particular chapter. Also, same for the chapters.

So, my logic was to looks for font class: tk4l (which is unique font size for the body of context) from this web site:

http://ift.tt/2kRSmql

and if it finds the font class then add 1 to my count of chapters and if fails to find the font class move on to the next book ( book += 1 ) and do the same thing..

My question is...

1) how can I print that chapter count?? 2) I have no idea how I should count the number of verses..

I just started to study Python. Please help me on this.. T.T




Aucun commentaire:

Enregistrer un commentaire