from bs4 import BeautifulSoup
import requests
r = requests.get('http://www.jxufe.edu.cn')
html = r.text
soup = BeautifulSoup(html)
Soup = soup.prettify()
text = soup.text
text = text.replace("\n", "")
with open('html.txt', 'w', encoding='utf-8') as fp:
fp.write(text)
print(x)