Karishma
Karishma

Reputation: 11

'NoneType' object is not for beautifulsoup

I am trying to web scraping. However due to this error not able to go ahead. I would be great if anyone can help me with this.

This is my code.

from bs4 import BeautifulSoup as soup
from urllib.request import urlopen as uReq
my_url = "https://www.newegg.com/Video-Cards-Video-Devices/Category/ID-38?Tpk=graphics%20card"

uClient = uReq(my_url)
page_html = uClient.read()
uClient.close()
#html parsing
page_soup = soup(page_html,"html.parser")
containers = page_soup.findALL("div",{"class":"item-branding"})

BELOW IS THE ERROR


TypeError Traceback (most recent call last) in 13 14 ---> 15 containers = page_soup.findALL("div",{"class":"item-branding"}) 16 length(containers) 17

TypeError: 'NoneType' object is not callable

Upvotes: 1

Views: 42

Answers (1)

San
San

Reputation: 463

it is page_soup.findAll("div",{"class":"item-branding"}) . Not page_soup.findALL("div",{"class":"item-branding"}) (Note the small 'l')

Upvotes: 1

Related Questions