bigghuggs commited on
Commit
1da716d
·
verified ·
1 Parent(s): b4f3abb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -548,6 +548,8 @@ def updateItemDisplay(seshid, budget=False, pallete_change=False):
548
  summarisePerStore(seshid)
549
 
550
  sesh.product_pd_counts = [(product,pd_count) for store in sesh.summary_joined for product,pd_count in sesh.summary_joined[store].items()]
 
 
551
  item_locator_data = {data[1]: sesh.item_data_[sesh.current_img_signature][sesh.room_type][sesh.room_style][sesh.price][sesh.Palette_ids[sesh.current_img_signature]][data[1]][data[0]] for data in sesh.display_items_[sesh.current_img_signature] if data[1] not in ['Palette', 'Living Room', 'Bedroom']}
552
  print('item_locator_data: ', item_locator_data, '\n/*/*', [item_locator_data[product_pd_count[0]] for i,product_pd_count in enumerate(sesh.product_pd_counts)])
553
  responses = [r.decode('ISO-8859-1') if type(r) != type(None) else r for r in sesh.responses]
 
548
  summarisePerStore(seshid)
549
 
550
  sesh.product_pd_counts = [(product,pd_count) for store in sesh.summary_joined for product,pd_count in sesh.summary_joined[store].items()]
551
+ urls = [product_pd_count[1]['product_dict']['href'] for product_pd_count in sesh.product_pd_counts]
552
+ sesh.responses = asyncio.run(main(urls))
553
  item_locator_data = {data[1]: sesh.item_data_[sesh.current_img_signature][sesh.room_type][sesh.room_style][sesh.price][sesh.Palette_ids[sesh.current_img_signature]][data[1]][data[0]] for data in sesh.display_items_[sesh.current_img_signature] if data[1] not in ['Palette', 'Living Room', 'Bedroom']}
554
  print('item_locator_data: ', item_locator_data, '\n/*/*', [item_locator_data[product_pd_count[0]] for i,product_pd_count in enumerate(sesh.product_pd_counts)])
555
  responses = [r.decode('ISO-8859-1') if type(r) != type(None) else r for r in sesh.responses]