Answer the question
In order to leave comments, you need to log in
How to get span value?
URL_STAT = '*скрыта ссылка*'
def check_ip(message):
chrome_options = webdriver.ChromeOptions()
chrome_options.binary_location = os.environ.get('GOOGLE_CHROME_BIN')
driver = webdriver.Chrome(chrome_options=chrome_options)
driver.get(URL_STAT)
driver.find_element_by_xpath('//*[@id="GDPR1"]/div/div/p[2]/label').click()
driver.find_element_by_xpath('//*[@id="GDPR1"]/div/div/p[3]/button').click()
time.sleep(1)
r = requests.get(URL_STAT)
start = time.time()
while True:
soup = BeautifulSoup(r.text, 'html.parser')
titles = [div['title'] for div in soup.find_all('div', title=True)]
for el in titles:
print(el)
time.sleep(0.8)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question