-1
我想沒有得到評論的特定產品的計數ValueError異常:無效的字面INT()基數爲10:'12,652'
的代碼是:
total_reviews = soup.find("div", {"class": "feature"}).findNext(
"span", {"id": "acrCustomerReviewText"}).string
x = ''
for number in total_reviews:
if number == ' ':
break
else:
x = x + number
num_reviews =int(x)
的'int'在它逗號?真?來吧!還有祝你好運 ;-) – shellter