import requests from bs4 import BeautifulSoup url = 'https://www.annabac.com/annales-bac/acidification-de-l-ocean' response = requests.get(url, verify=False) if response.status_code == 200: soup = BeautifulSoup(response.text, 'html.parser') inner_content = soup.find('div', class_='inner-content') if inner_content: inner_content_text = ''.join(map(str, inner_content.contents)) inner_content_text = inner_content_text.replace("/modules-assets/", "https://www.annabac.com/modules-assets/") model = f"""