Beispiel #1
0
                            url_index += 1
                        except:
                            print("normal except")
                            continue
                        break

                except:
                    print("normal except_2")
                    continue
                break
        while True:
            try:
                self.wb.save(self.excel_path)
            except:
                print("Please check your excel file.")
                continue
            break
        self.browser.close()
        return url_index


if __name__ == "__main__":

    ExtractProduct = ExtractProduct()
    ExtractProduct.get_total_num_of_products()
    ExtractProduct.get_url_of_each_product()
    limit_row = ExtractProduct.get_information_from_each_product()

    upload = UploadFile.UploadFile("MultifoodsBOT", limit_row, 12)
    upload.uploadFile()
    print("Task completed")
Beispiel #2
0
                    self.excel_sheet.cell(
                        i + 2, 3).value = self.products_url[i]['category']
                    self.excel_sheet.cell(i + 2, 4).value = price
                    self.excel_sheet.cell(i + 2, 5).value = package_type
                    print(str(self.products_num) + "/" + str(i))
                except:
                    print("normal except")
                    continue
                break

        while True:
            try:
                self.wb.save(self.excel_path)
            except:
                print("Please check your excel file.")
                continue
            break
        self.browser.close()
        return self.products_num + 1


if __name__ == "__main__":

    ExtractProduct = ExtractProduct()
    ExtractProduct.get_all_products_url()
    limit_row = ExtractProduct.get_information_from_each_product()

    upload = UploadFile.UploadFile("Vinhais", limit_row, 7)
    upload.uploadFile()
    print("Task completed")
Beispiel #3
0
                                        self.products_num + 2,
                                        5).value = price_unit
                                    print(self.products_num)
                                    self.products_num += 1
                                except:
                                    print("normal except")
                                    continue
                                break
            except:
                continue
            break
        while True:
            try:
                self.wb.save(self.excel_path)
            except:
                print("Please check your excel file.")
                continue
            break
        self.browser.close()
        return self.products_num


if __name__ == "__main__":

    ExtractProduct = ExtractProduct()
    ExtractProduct.login()
    limit_row = ExtractProduct.get_information_from_each_product()

    upload = UploadFile.UploadFile("PORCO FELIZ", limit_row, 7)
    upload.uploadFile()
    print("Task completed")
Beispiel #4
0
                                              5).value = amount
                        print(self.products_num)
                        self.products_num += 1
                        self.browser.find_element_by_class_name(
                            'ant-modal-close').click()
                        time.sleep(1)
                    except:
                        print("normal except")
                        continue
                    break

        while True:
            try:
                self.wb.save(self.excel_path)
            except:
                print("Please check your excel file.")
                continue
            break
        self.browser.close()
        return self.products_num


if __name__ == "__main__":

    ExtractProduct = ExtractProduct()
    limit_rows = ExtractProduct.get_information_from_each_product()

    upload = UploadFile.UploadFile("Frubana", limit_rows, 7)
    upload.uploadFile()
    print("Task completed")
Beispiel #5
0
                    break
                while True:
                    try:
                        # self.browser.execute_script("window.history.go(-1)")
                        self.browser.back()
                        time.sleep(2)
                    except:
                        print("back error")
                        continue
                    break

        while True:
            try:
                self.wb.save(self.excel_path)
            except:
                print("Please check your excel file.")
                continue
            break
        self.browser.close()
        return self.products_num


if __name__ == "__main__":

    ExtractProduct = ExtractProduct()
    limit_row = ExtractProduct.get_information_from_each_product()

    upload = UploadFile.UploadFile("EstoqueOnlineBOT", limit_row, 7)
    upload.uploadFile()
    print("Task completed")