Aug-25-2022, 06:38 PM
Hi, I try to translate a Chinese page to an English page,
but the result is gibberish,
how to "convert" It to Chinese?
but the result is gibberish,
how to "convert" It to Chinese?
# importing the modules import requests from bs4 import BeautifulSoup # target url url = "https://www.boshisw.com/boshi/14_14309/" # making requests instance reqs = requests.get(url) # using the BeautifulSoup module soup = BeautifulSoup(reqs.text, 'html.parser') # displaying the title print("Title of the website is : ") for title in soup.find_all('title'): print(title.get_text())
Error:Title of the website is :
ÎÒÔÚÔʼÉç»áµ±´å³¤×îÐÂÕ½ÚÁбí_ÎÒÔÚÔʼÉç»áµ±´å³¤×îÐÂÕ½ÚĿ¼_²©ÊËÊéÎÝ
thank you for reading, have a nice day