Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pandas as pd
- import os
- from bs4 import BeautifulSoup as bs
- import urllib.request
- import requests
- from selenium import webdriver
- from selenium.webdriver.chrome.service import Service
- from selenium.webdriver.chrome.options import Options
- from webdriver_manager.chrome import ChromeDriverManager
- from selenium.webdriver.common.by import By
- from selenium.webdriver.common.keys import Keys
- # chrome_driver_path = '"C:\Program Files\Google\Chrome\Application\chrome.exe"'
- driver = webdriver.Chrome(ChromeDriverManager().install())
- if __name__ == '__main__':
- df = pd.read_excel('test_example.xlsx')
- ident = 'identifier'
- ident_type = 'identifier_type'
- count = 0
- # browser = webdriver.Firefox()
- driver.get(url)
- for ind in df.index:
- if df[ident][ind] != None or df[ident_type][ind] == 'ИНН':
- elem = driver.find_element(By.CLASS_NAME, 'prr-form__item-input')
- elem.send_keys(df[ident][ind] + Keys.RETURN)
- stop = 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement