I did try
requests_html install for 3.8 win-10,and no error on install(
Install tutorial).
I tested it before was not stable then,now also lack updates.
Users in Issue tracker.
Quote:So I'm guessing that this project is abandoned.
Using Selenium and web-driver(Chrome or Firefox) is stable solution that works for most cases.
Example in your previous
Thread.
Yahoo Finance is not as easy site to parse,here how it look with tool mention over.
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.keys import Keys
from bs4 import BeautifulSoup
import time
#--| Setup
options = Options()
#options.add_argument("--headless")
#options.add_argument("--window-size=1980,1020")
#options.add_argument('--disable-gpu')
browser = webdriver.Chrome(executable_path=r'chromedriver.exe', options=options)
#--| Parse or automation
url = 'https://finance.yahoo.com/quote/BARC.L/key-statistics?p=BARC.L'
browser.get(url)
soup = BeautifulSoup(browser.page_source, 'lxml')
accept = browser.find_elements_by_xpath('//*[@id="consent-page"]/div/div/div/div[3]/div/form/button[1]')
accept[0].click()
time.sleep(2)
main_vaule = browser.find_elements_by_xpath('//*[@id="quote-header-info"]/div[3]/div/div/span[1]')
print(main_vaule[0].text)
Output:
138.54
Comment out
--headless
and the browser will not load.
If new to this should load browser,then can see stuff happens like push button..ect.