from selenium.webdriver import Chrome
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
import os
import time
target_page = "https://www.audit-it.ru/buh_otchet/7736050003_pao-gazprom"
xpath_testing = '//*[@id="tblIdx1"]/tbody/tr[4]/td[3]'
dir_current = os.getcwd()
driverLocation = dir_current + "\chromedriver.exe"
chrome_options = Options()
chrome_options.add_argument("--headless")
driver = Chrome(driverLocation, chrome_options=chrome_options)
data_text = driver.get(target_page)
elements = driver.find_elements(By.XPATH, xpath_testing)
print(elements)
import requests
from lxml import html
pageContent=requests.get('https://www.audit-it.ru/buh_otchet/7736050003_pao-gazprom')
tree = html.fromstring(pageContent.content)
g=tree.xpath('//*[@id="octable"]/tr/td[8]/b/text()')
print(g)
import requests
r = requests.get('https://www.audit-it.ru/buh_otchet/7736050003_pao-gazprom')
print(r.text)
<script>
var Data = {
"2011": {
"date": "31.12.11",
"period": 2011,
"values": {
"1100": "6630253575",
"1110": "371494",
"1120": "3079812",
"1130": "40612661",