REMitchell/python-scraping

Chapter04_CrawlingModels.ipynb, Dealing with different website layouts have wrong codes

yeop-sang opened this issue · 0 comments

line 25:
body = bs.find('div', {'class', 'post-body'}).text

A Parameter named 'attrs' should be dic type, but the example code and the book has wrong codes.

I recommed change the code like
body = bs.find('div', {'class': 'post-body'}).text