When the price doesn't exist the script should save the price as unknown in the json file.
Instead it scrapes the span tag and prints concatenation error.
A quick solution could be to check the variable.
from bs4 import BeautifulSoup, Tag
price_soup = BeautifulSoup(price, 'html.parser')
if type(price_soup == Tag)
When the price doesn't exist the script should save the price as unknown in the json file. Instead it scrapes the span tag and prints concatenation error.
A quick solution could be to check the variable.