Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from selenium import webdriver
- import selenium
- import time
- driver = webdriver.Chrome('/home/bogdan/Загрузки/chromedriver_linux64/chromedriver')
- driver.get('https://parimatch.com/ru/table-tennis')
- time.sleep(4)
- block = driver.find_elements_by_class_name('_2c98cYcZ15eCL3kXBibIh_')[:1]
- for item in block:
- name = item.find_element_by_class_name('_26B_f8qfrQUqtdUjGVw3dk').text
- time = item.find_element_by_class_name('_1LmvJKRD8MAsF3wKlXcsgF').text[9:]
- p1 = item.find_element_by_class_name('_3Sa1tkZVXvesvtPRE_cUEV').text
- p2w = item.find_elements_by_class_name('_3Sa1tkZVXvesvtPRE_cUEV')[1:]
- for i in p2w:
- p2 = i.text
- info = []
- if float(p1) > 1.83 and float(p1) < 1.90:
- if float(p2) > 1.83 and float(p2) < 1.90:
- result = {"times": time, "name": name, "p1": p1, "p2": p2, }
- info.append(result)
- prev_post = info
- while True:
- last_post = info
- if prev_post != last_post:
- print(info)
Add Comment
Please, Sign In to add comment