File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 1010 required_text = "Catan"
1111 sb .cdp .press_keys ('input[aria-label="Search"]' , search + "\n " )
1212 sb .sleep (3.8 )
13- items = sb .cdp .find_elements ('div[data-testid="list-view"]' )
1413 print ('*** Walmart Search for "%s":' % search )
1514 print (' (Results must contain "%s".)' % required_text )
15+ unique_item_text = []
16+ items = sb .cdp .find_elements ('div[data-testid="list-view"]' )
1617 for item in items :
1718 if required_text in item .text :
1819 description = item .querySelector (
1920 '[data-automation-id="product-price"] + span'
2021 )
21- if description :
22+ if description and description .text not in unique_item_text :
23+ unique_item_text .append (description .text )
2224 print ("* " + description .text )
2325 price = item .querySelector (
2426 '[data-automation-id="product-price"]'
You can’t perform that action at this time.
0 commit comments