Jun-06-2018, 10:25 AM
First Issue-
check_merchant_product_id = soup.find('div', attrs={'class': 'description'}).findAll('span')[3] if check_merchant_product_id is not None: merchant_product_id = check_merchant_product_id.text if merchant_product_id is not None: prod_details['merchant_product_id'] = merchant_product_id
Error:getting 'Product Code:' instead of value
Second Issue-prod_details['merchant_image_urls'] = ",".join(list(filter(None, map(lambda x: x['href'].replace(",", "%2C"), soup.find('div', attrs={ 'class': 'left'}).findAll( 'a')))))
Error:getting broken image urls
Third Issue-check_price = soup.find('span', attrs={"class": "price-old"}) if check_price is not None: prod_details['price'] = check_price.text.replace("SGD $", "") check_sale_price = soup.find('span', attrs={"class": "price-new"}) if check_sale_price is not None: prod_details['sale_price'] = check_sale_price.text.replace("SGD $", "")
Error:getting NaN for some products