hotfix 3
parent
2726c0dd0f
commit
14363f1169
BIN
database.db
BIN
database.db
Binary file not shown.
13
main.py
13
main.py
|
@ -39,8 +39,8 @@ class Parser:
|
|||
if IS_PROD:
|
||||
self._options.add_argument("--disable-extensions")
|
||||
self._options.add_argument("--disable-gpu")
|
||||
self._options.add_argument("--headless=new")
|
||||
self._options.add_argument("window-size=1920,1080")
|
||||
self._options.add_argument("--headless=new")
|
||||
self._service = webdriver.ChromeService(executable_path=ChromeDriverManager().install())
|
||||
|
||||
self.storage = Storage()
|
||||
|
@ -199,7 +199,7 @@ class Parser:
|
|||
row_15.click()
|
||||
time.sleep(10)
|
||||
|
||||
if not IS_PROD:
|
||||
if IS_PROD:
|
||||
self.apply_offer()
|
||||
logger.success("Заявка успешно отправлена")
|
||||
time.sleep(10)
|
||||
|
@ -208,8 +208,17 @@ class Parser:
|
|||
|
||||
def apply_offer(self):
|
||||
btn = self.find_elem(By.CSS_SELECTOR, "form[name=AUCTION_OFFER] table.form-control_table button")
|
||||
ActionChains(self._driver).scroll_to_element(btn).scroll_by_amount(0, 100).perform()
|
||||
btn.click()
|
||||
|
||||
pin = self.find_elem(By.CSS_SELECTOR, ".prt-ecp_sign input")
|
||||
pin.send_keys("5732")
|
||||
|
||||
sign_btn = self.find_elem(By.CSS_SELECTOR, ".prt-ecp_sign button.btn-primary")
|
||||
time.sleep(1)
|
||||
sign_btn.click()
|
||||
time.sleep(10)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
with Parser() as parser:
|
||||
|
|
Loading…
Reference in New Issue