def update_items_sheet(self): self.items = self.sheet.col_values(self.items_colm)[1:] amazon_bot = AmazonBot(self.items) urls, prices, name_of_items = amazon_bot.search_items() print("\nUpdating the Spreadsheet.....\n") for x in range(len(urls)): self.sheet.update_cell(x+2, self.price_colm, prices[x]) self.sheet.update_cell(x+2, self.prod_url, urls[x]) self.sheet.update_cell(x+2, self.prod_name, name_of_items[x])
def process_item_list(self): items = self.sheet.col_values(self.item_col)[1:] amazon_box = AmazonBot(items) prices, urls, names = amazon_box.search_items() print("Updating spreedsheet.") for i in range(len(prices)): self.sheet.update_cell(i + 2, self.price_col, prices[i]) self.sheet.update_cell(i + 2, self.url_col, urls[i]) self.sheet.update_cell(i + 2, self.product_name_col, names[i])
def process_item_list(self): # Skip over the column heading in the spreadsheet. items = self.sheet.col_values(self.item_col)[1:] print(items) amazon_bot = AmazonBot(items) prices, urls, names = amazon_bot.search_items() print("Updating spreadsheet.") print(prices, urls, names) for i in range(len(prices)): self.sheet.update_cell(i + 2, self.price_col, prices[i]) self.sheet.update_cell(i + 2, self.url_col, urls[i]) self.sheet.update_cell(i + 2, self.product_name_col, names[i])