from pathlib import Path src = Path("/mnt/data/mh-media-updated-site/cookies.html").read_text() src = src.replace('Services', 'Solutions') src = src.replace('\n