Beautiful soup 4 package not loading

Why can’t I download this package?


import requests
from bs4 import BeautifulSoup

def scrape_indeed():
    url = ""
    response = requests.get(url)
    soup = BeautifulSoup(response.content, 'html.parser')
    jobs = soup.find_all('div', class_='jobsearch-SerpJobCard')[:10]
    scraped_data = []
    for job in jobs:
        title = job.find('h2', class_='title').get_text(strip=True)
        company = job.find('span', class_='company').get_text(strip=True)
        pay = job.find('span', class_='salaryText')
        pay = pay.get_text(strip=True) if pay else "N/A"
        link = "" + job.find('a', href=True)['href']
        data = f"Title: {title}, Company: {company}, Pay: {pay}, Link: {link}"
    return scraped_data

scraped_data = scrape_indeed()
for data in scraped_data:

Hi @michaeldavidmar , welcome to the forums!
Enter this line in the .replit file, below entrypoint:

disableGuessImports = true

Then, remove this line from replit.nix:

pkgs.from bs4 import BeautifulSoup

Then, enter poetry add bs4 requests in the Shell.
Hope this helps!

1 Like

:wave: Welcome @michaeldavidmar!

Could you try entering upm add beautifulsoup4 in the Shell?

That won’t fix it. They’re trying to install it through the Packager.

1 Like

Added “insert beatifulsoup4” or something like that last night and just tried your suggestion. Not sure what you mean by enter this line in the .replit file below “entrypoint”

Not sure where to find/place these

I also can’t find the “.replit file”

Asked and recieved this and then the second photo

Second photo

What happens if they just run the project again now?

You mean make a new project entirely or do what exactly? I didn’t fully take his advice yet because I can’t find the replit file

You can find the .replit and replit.nix files by clicking the next to “Files” then clicking “Show hidden files”.



Show hidden files

From there, remove the pkgs.from bs4 import BeautifulSoup line, and your Repl should work again!

I was excited and hoping this would get it to execute by now nothing is happening. Is it possible to get live help? I’m happy to pay

What happens now?

That’d be a question for Replit Staff, the rest of us are volunteers here.

1 Like

Ok, then enter poetry add bs4 in the Shell.
I vhecked your repl and everything seems correct. Just install it with the command above and it should work.