You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from requests_html import HTMLSession
def main() -> None:
session = HTMLSession()
r = session.get('https://python.org/')
print(f"all links = {r.html.absolute_links}")
if __name__ == '__main__':
main()
Traceback (most recent call last):
File "E:\11-Projects\learning_requests_html.py", line 1, in
from requests_html import HTMLSession
File "E:\11-Projects.venv\Lib\site-packages\requests_html.py", line 14, in
from lxml.html.clean import Cleaner
File "E:\11-Projects.venv\Lib\site-packages\lxml\html\clean.py", line 18, in
raise ImportError(
ImportError: lxml.html.clean module is now a separate project lxml_html_clean.
Install lxml[html_clean] or lxml_html_clean directly.
I guess I should mention that it worked after installing lxml but thought I should say the docs are not correct.
The text was updated successfully, but these errors were encountered:
As doc here: https://requests-html.kennethreitz.org/
Traceback (most recent call last):
File "E:\11-Projects\learning_requests_html.py", line 1, in
from requests_html import HTMLSession
File "E:\11-Projects.venv\Lib\site-packages\requests_html.py", line 14, in
from lxml.html.clean import Cleaner
File "E:\11-Projects.venv\Lib\site-packages\lxml\html\clean.py", line 18, in
raise ImportError(
ImportError: lxml.html.clean module is now a separate project lxml_html_clean.
Install lxml[html_clean] or lxml_html_clean directly.
I guess I should mention that it worked after installing lxml but thought I should say the docs are not correct.
The text was updated successfully, but these errors were encountered: