How to Solve NameError: name 'HTMLSession' is not defined -- requests_html

Solution: Import the 'HTMLSession' module

To Solve the error, add the following line to the top of your code.

from requests_html import HTMLSession

 

For more information:
Python requests_html HTMLSession