raznem / parsera

Lightweight library for scraping web-sites with LLMs
https://parsera.org
GNU General Public License v2.0
732 stars 47 forks source link

ModuleNotFoundError: No module named 'pkg_resources' #8

Closed MuLIAICHI closed 4 weeks ago

MuLIAICHI commented 1 month ago

Helo guys, thank you for this project. I'm trying to run an example of the script : import os from parsera import Parsera

os.environ["OPENAI_API_KEY"] = "sk-**"

url = "https://news.ycombinator.com/" elements = { "Title": "News title", "Points": "Number of points", "Comments": "Number of comments", }

scrapper = Parsera() result = scrapper.run(url=url, elements=elements)

but I get this full error : Traceback (most recent call last): File "C:\Users\dell\Desktop\toTransfer\PperH\IMBDScraper\Helpers\guruScraper.py", line 2, in from parsera import Parsera File "C:\Users\dell\Desktop\toTransfer\PperH\IMBDScraper\Helpers\llm\Lib\site-packages\parsera__init__.py", line 1, in from parsera.main import Parsera File "C:\Users\dell\Desktop\toTransfer\PperH\IMBDScraper\Helpers\llm\Lib\site-packages\parsera\main.py", line 7, in from parsera.page import fetch_page_content File "C:\Users\dell\Desktop\toTransfer\PperH\IMBDScraper\Helpers\llm\Lib\site-packages\parsera\page.py", line 4, in from playwright_stealth import stealth_async File "C:\Users\dell\Desktop\toTransfer\PperH\IMBDScraper\Helpers\llm\Lib\site-packages\playwright_stealth__init__.py", line 2, in
from playwright_stealth.stealth import stealth_sync, stealth_async, StealthConfig File "C:\Users\dell\Desktop\toTransfer\PperH\IMBDScraper\Helpers\llm\Lib\site-packages\playwright_stealth\stealth.py", line 6, in
import pkg_resources ModuleNotFoundError: No module named 'pkg_resources'

akshaybob commented 1 month ago

you can try after installing setuptools :- pip install setuptools

MuLIAICHI commented 1 month ago

Hi, yes that's work thank you .