Skip to content

Productcompetitors

flowtask.components.ProductCompetitors

ProductCompetitors

ProductCompetitors(loop=None, job=None, stat=None, **kwargs)

Bases: FlowComponent, SeleniumService, HTTPService

Product Competitors Scraper Component

Overview: Pluggable component for scraping product information from competitors (BestBuy and Lowes).

Properties: - url_column (str): Name of the column containing URLs to scrape (default: 'url') - account_name_column (str): Name of the column containing retailer name (default: 'account_name') - product_id_column (str): Name of the column containing product IDs (default: 'product_id') - competitors (list): List of competitor brands to search for (e.g. ['Insignia', 'TCL', 'LG', 'Sony', 'Samsung'])

close async

close()

Clean up resources.

run async

run()

Execute scraping for all URLs in the DataFrame.

start async

start(**kwargs)

Initialize the component and validate required parameters.

parsers

BestBuyScrapper

BestBuyScrapper(*args, **kwargs)

Bases: ProductCompetitorsBase

product_information async
product_information(response, idx, row)

Get the product information from BestBuy.

LowesScrapper

LowesScrapper(*args, **kwargs)

Bases: ProductCompetitorsBase

connect async
connect()

Creates the Driver and Connects to the Site.

disconnect async
disconnect()

Disconnects the Driver and closes the Connection.

product_information async
product_information(response, idx, row)

Get the product information from Lowes.

base

ProductCompetitorsBase
ProductCompetitorsBase(*args, **kwargs)

Bases: SeleniumService, HTTPService

ProductCompetitorsBase Model. Define how competitor product scrappers should work.

connect abstractmethod async
connect()

Creates the Driver and Connects to the Site.

disconnect abstractmethod async
disconnect()

Disconnects the Driver and closes the Connection.

set_empty_values
set_empty_values(row, brand)

Set empty values for all standard columns for a given brand

bestbuy

BestBuyScrapper
BestBuyScrapper(*args, **kwargs)

Bases: ProductCompetitorsBase

product_information async
product_information(response, idx, row)

Get the product information from BestBuy.

lowes

LowesScrapper
LowesScrapper(*args, **kwargs)

Bases: ProductCompetitorsBase

connect async
connect()

Creates the Driver and Connects to the Site.

disconnect async
disconnect()

Disconnects the Driver and closes the Connection.

product_information async
product_information(response, idx, row)

Get the product information from Lowes.

scrapper

ProductCompetitors

ProductCompetitors(loop=None, job=None, stat=None, **kwargs)

Bases: FlowComponent, SeleniumService, HTTPService

Product Competitors Scraper Component

Overview: Pluggable component for scraping product information from competitors (BestBuy and Lowes).

Properties: - url_column (str): Name of the column containing URLs to scrape (default: 'url') - account_name_column (str): Name of the column containing retailer name (default: 'account_name') - product_id_column (str): Name of the column containing product IDs (default: 'product_id') - competitors (list): List of competitor brands to search for (e.g. ['Insignia', 'TCL', 'LG', 'Sony', 'Samsung'])

close async
close()

Clean up resources.

run async
run()

Execute scraping for all URLs in the DataFrame.

start async
start(**kwargs)

Initialize the component and validate required parameters.