Skip to content

Brother

flowtask.components.ProductInfo.parsers.brother

BrotherParser

BrotherParser(*args, **kwargs)

Bases: ParserBase

Parser for Brother product information.

Extracts product details from Brother's USA website using Selenium.

get_product_urls

get_product_urls(search_results, max_urls=5)

Extract relevant product URLs from search results.

Parameters:

Name Type Description Default
search_results List[Dict[str, str]]

List of search result dictionaries

required
max_urls int

Maximum number of URLs to return

5

Returns:

Type Description
List[str]

List of product URLs that match the Brother product pattern

parse async

parse(url, search_term, retailer=None)

Parse product information from a Brother URL using Selenium.

Parameters:

Name Type Description Default
url str

Brother product URL

required
search_term str

Original search term

required
retailer Optional[str]

Optional retailer information (not used for Brother)

None

Returns:

Type Description
Dict[str, Any]

Dictionary with product information