REMitchell / python-scraping

Code samples from the book Web Scraping with Python http://shop.oreilly.com/product/0636920034391.do
4.38k stars 2.47k forks source link

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

Open yeop-sang opened 3 years ago

yeop-sang commented 3 years ago

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