Daniel P
Daniel P

Reputation: 19

'NoneType' object is not callable' in BeautifulSoup findall()

I am very new to the wonderful world of python. The below scraper yields an object not callable error and I really do not understand why that might be. Any help very much appreciated

from urllib.request import urlopen
from bs4 import BeautifulSoup
html = urlopen("https://www.maxxim.de/lte-mini-sms1?maxxim=7hs6q1jfl95fip6qumcum4rfh4")
bsObj = BeautifulSoup(html,"html.parser")
nameList = bsObj.findall("h2")
for name in nameList:
     print (name.get_text())

Upvotes: 1

Views: 5362

Answers (1)

A Magoon
A Magoon

Reputation: 1210

Use find_all("h2") rather than findall("h2").

Upvotes: 8

Related Questions