Hp¶
flowtask.components.ProductInfo.parsers.hp
¶
HPParser
¶
Bases: ParserBase
Parser for HP product information.
Extracts product details from HP's website using Selenium for dynamic content.
get_product_urls
¶
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 HP product pattern |
parse
async
¶
Parse product information from an HP URL using Selenium.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
url
|
str
|
HP product URL |
required |
search_term
|
str
|
Original search term |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dictionary with product information |