PricePinion / PricePinion-Backend

This repo is the backend for PricePinion.
https://pricepinion-backend.azurewebsites.net/
0 stars 2 forks source link

Collect product sizes for webscraper on QFC and Fred Meyer #21

Closed maslindc2 closed 4 months ago

maslindc2 commented 4 months ago

Currently the QFC web scraper can't tell the difference between product sizes. For example the 16 oz and 24 oz will get filed as the same product.

maslindc2 commented 4 months ago

Currently having issues selecting the span element for the product size as it shares the exact same structure as the SNAP EBT logo and the price per pound. Will conduct further research into this will be needed. Expected fix for this bug will be PricePinion backend V3.

maslindc2 commented 4 months ago

Created a section to detect product size of each item. Currently experience an issue with a trailing space. Below is an example of this.

{
        "productID": "2bbf9f557861b021dc19f9b009a0a0ba",
        "productName": "Simple Truth Organic® Whole Milk, 1/2 gal  ",
        "storeName": "Fred Meyer",
        "productPrice": "$3.69",
        "productLink": "https://www.fredmeyer.com/p/simple-truth-organic-whole-milk/0001111042850",
        "productImage": "https://www.kroger.com/product/images/medium/front/0001111042850",
        "productComparison": [
            {
                "productName": "Simple Truth Organic® Whole Milk, 1/2 gal  ",
                "storeName": "QFC",
                "productPrice": "$3.69",
                "productLink": "https://www.qfc.com/p/simple-truth-organic-whole-milk/0001111042850",
                "productImage": "https://www.kroger.com/product/images/medium/front/0001111042850"
            }
        ]
    },
maslindc2 commented 4 months ago

Fixed issue by adding .trim() to the end of product sizes variable.