実現したいこと
Spyder(Python 3.9)でrequests_htmlを使いたい
発生している問題・エラーメッセージ
AttributeError: 'Future' object has no attribute 'html'
該当のソースコード
python
1# -*- coding: utf-8 -*- 2 3from requests_html import AsyncHTMLSession 4import asyncio 5 6if asyncio.get_event_loop().is_running(): # Only patch if needed (i.e. running in Notebook, Spyder, etc) 7 import nest_asyncio 8 nest_asyncio.apply() 9 10url = "https://www.google.com/?hl=ja" 11 12session = AsyncHTMLSession() 13r = session.get(url) 14r.html.render() 15print("finished")

バッドをするには、ログインかつ
こちらの条件を満たす必要があります。