Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: lxml.html.clean module is now a separate project lxml_html_clean #1106

Open
escobar5 opened this issue Jun 21, 2024 · 1 comment

Comments

@escobar5
Copy link

I'm getting this error running facebook-scraper:

Traceback (most recent call last):
File "/Users/escobar5/.local/bin/facebook-scraper", line 5, in
from facebook_scraper.main import run
File "/Users/escobar5/.local/pipx/venvs/facebook-scraper/lib/python3.12/site-packages/facebook_scraper/init.py", line 13, in
from .facebook_scraper import FacebookScraper
File "/Users/escobar5/.local/pipx/venvs/facebook-scraper/lib/python3.12/site-packages/facebook_scraper/facebook_scraper.py", line 15, in
from requests_html import HTMLSession
File "/Users/escobar5/.local/pipx/venvs/facebook-scraper/lib/python3.12/site-packages/requests_html.py", line 14, in
from lxml.html.clean import Cleaner
File "/Users/escobar5/.local/pipx/venvs/facebook-scraper/lib/python3.12/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.

Python 3.12.4

@BinhPQ2
Copy link

BinhPQ2 commented Jun 22, 2024

Try to

pip install lxml_html_clean

It might do the trick. This worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants