**** КОД ****
Код: Выделить всё
from bs4 import BeautifulSoup as bs
import os
import re
# Remove the last segment of the path
base = os.path.dirname(os.path.abspath(__file__))
# Coffee Template
coffee = base + "\website-templates-master\coffee-shop-free-html5-template\index.html"
print(coffee)
with open(coffee) as coffee_html:
# turn html into a list
coffee_blob = coffee_html.readlines()
for line in coffee_blob:
if "
Подробнее здесь: [url]https://stackoverflow.com/questions/75728183/replace-the-body-of-one-website-with-another-using-beautiful-soup-python[/url]