Login and get codingIn this Bite you will parse Packt's free learning ebook site extracting the html for the daily free ebook:
As this page is changing all the time (and to not hit their servers too much) we saved a copy of the html on our server and loaded it into
CONTENT
Now the best part: meet your new best friend when dealing with HTML: BeautifulSoup, a module that makes dealing with html a breeze.
Get coding: complete
get_book
by making aSoup
object and parsing out the relevant fields as defined inBook
. Next populate and return thisnamedtuple
.Have fun and keep calm and code in Python!
276 out of 279 users completed this Bite.
Will you be the 277th person to crack this Bite?
Resolution time: ~73 min. (avg. submissions of 5-240 min.)
Our community rates this Bite 5.25 on a 1-10 difficulty scale.
» Up for a challenge? 💪