Hi! I’m kind of new to replit, and I was trying to gather data from this website: https://hadith.inoor.ir/ar/home via BeautifulSoup, however I get the following error: “Connection to hadith.inoor.ir timed out.”
At first I assumed that this was an issue with the JavaScript, so I ran it using Selenium but received the same error. Then I ran it using VS Code and it worked exactly how I wanted it to. Which led me to the conclusion that Replit was the problem.
Currently my hypothesis is that iranian websites have a hard time working with Replit, I say this because I’ve tried multiple other iranain websites and received the same error. I personally don’t really care about the iranian thing, I just need the data on the website. Thanks!
import requests
from bs4 import BeautifulSoup
def sol(link):
r = requests.get(link)
soup = BeautifulSoup(r.content, "html.parser")
title = soup.find("h2")
title = title.get_text()
print(title)
print(sol("https://hadith.inoor.ir/fa/home"))