BeautifulSoup error

Link ti project:https://www.codecademy.com/courses/learn-web-scraping/projects/chocolate-scraping-with-beautiful-soup

I cannot get around an error in the cocoa BeautifulSoup project. The error appears in the following:
cocoa_percent = int(td.get_text().strip(%))

in the context of:

cocoa_percents =
cocoa_percent_tags= soup.select(".CocoaPercent")

for td in cocoa_percent[1:]:
cocoa_percent = int(td.get_text().strip(%))
cocoa_percent.append(percent)

can anyone see what I am doing wrong?
Chris

Hi Chris,
I’ m not sure but I think that in the strip method your syntax is wrong.
It should be the following:
cocoa_percent = int(td.get_text().strip("%"))
Hope it helps!